uk.ac.cam.ucs.webauth
Class WLSRequest

java.lang.Object
  extended byuk.ac.cam.ucs.webauth.WLSRequest

public class WLSRequest
extends Object

Represents an authentication request message.

Version:
$Revision: 1.5 $ $Date: 2005/03/11 10:03:39 $

Constructor Summary
WLSRequest()
          Default constructor.
 
Method Summary
 HashSet getAAuth()
          Returns the 'aauth' parameter from this request.
 Date getDate()
          Returns the date parameter from this request.
 String getDesc()
          Returns the site description from this request.
 boolean getFail()
          Returns the 'fail' parameter from this request.
 Boolean getIact()
          Returns the 'icat' parameter from this request.
 String getMsg()
          Returns the 'msg' parameter from this request.
 String getParams()
          Returns the params parameter from this request.
 URL getURL()
          Returns the url paramater from this request.
 int getVer()
          Returns the protocol version number from this request.
 void setAAuth(HashSet aauth)
          Sets the 'aauth' parameter in this request.
 void setDate(Date date)
          Sets the 'date' parameter in this request.
 void setDesc(String desc)
          Sets the site description in this request.
 void setFail(boolean fail)
          Set the 'fail' parameter in this request.
 void setIact(Boolean iact)
          Sets the 'iact' parameter in this request.
 void setMsg(String msg)
          Sets the 'msg' parameter in this request.
 void setParams(String params)
          Sets the 'params' parameter in this request.
 void setURL(URL url)
          Set the url paramater in this request.
 void setVer(int ver)
          Sets the protocol version number in this request.
 String toQString()
          Returns this request in the format of a URL query string
 String toString()
          Returns a human-readable representation of this entire request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WLSRequest

public WLSRequest()
Default constructor.

Method Detail

setVer

public void setVer(int ver)
Sets the protocol version number in this request. Defaults to 1.

Parameters:
ver - the version number

getVer

public int getVer()
Returns the protocol version number from this request.

Returns:
the version number

setURL

public void setURL(URL url)
Set the url paramater in this request. This must be a fully-qualified http or https URL. On completion of the authentication process this URL will be used to compose an 'authentication response message' and to return this to the WAA. The URL may be displayed to the end-user to help identify the resource to which his/her identity is being disclosed.

Parameters:
url - a URL to set

getURL

public URL getURL()
Returns the url paramater from this request. See setURL for details, or null if the url has not been set.

Returns:
the url from the request or null

setDesc

public void setDesc(String desc)
Sets the site description in this request. This is a text description of the resource requesting authentication which may be displayed to the end-user to further identify the resource to which his/her identity is being disclosed. This data is restricted to printable ASCII characters (0x20 - 0x7e) [ANSI-X3.4-1986] though it may contain HTML character or numeric entities representing other characters. The characters '<' and '>' will be converted into HTML entities before being sent to the browser and as a result this text can not contain HTML markup.

Parameters:
desc - the description

getDesc

public String getDesc()
Returns the site description from this request. See setDesc for details or null if the description has not been set

Returns:
the description or null

setAAuth

public void setAAuth(HashSet aauth)
Sets the 'aauth' parameter in this request. This is a set of text strings representing the types of authentication that will satisfy this request. The default value, if the parameter is omitted or empty, is not specified but will always consist of at least one type of authentication that is at least as secure as username/password. At present, the only defined value for an element of aauth is pwd: an authentication using username and password. Elements starting 'x-' are reserved for experimental use by prior agreement.

Parameters:
aauth - the set of aceptable authentications

getAAuth

public HashSet getAAuth()
Returns the 'aauth' parameter from this request. See setAAuth for details. This will be an empty set if aauth has not been set

Returns:
the set of aceptable authentications

setIact

public void setIact(Boolean iact)
Sets the 'iact' parameter in this request. If true, requires that a re-authentication exchange takes place with the user.If false, requires that the authentication request can only succeed if the user's identity can be returned without interacting with the user - if this can't be achieved then the eventual response will have a status of STATUS_IACT_REQUIRED. If null, then a previously established identity may be returned if the WLS supports doing so, and if not then the user will be prompted as necessary.

Parameters:
iact - require (true) or prevent (false) interaction

getIact

public Boolean getIact()
Returns the 'icat' parameter from this request. See setIact for details.

Returns:
true (interaction required), false (interaction prevented), null (unset)

setMsg

public void setMsg(String msg)
Sets the 'msg' parameter in this request. This is text describing why authentication is being requested on this occasion which may be displayed to the end-user. This data is restricted to printable ASCII characters (0x20 - 0x7e) [ANSI-X3.4-1986] though it may contain HTML character or numeric entities representing other characters. The characters '<' and '>' will be converted into HTML entities before being sent to the browser and as a result this text can not contain HTML markup.

Parameters:
msg - the message

getMsg

public String getMsg()
Returns the 'msg' parameter from this request. See setMsg for details or null if a message has not been set

Returns:
the message

setParams

public void setParams(String params)
Sets the 'params' parameter in this request. This information will be returned unaltered in any WLS Response issued as a result of this request.

Parameters:
params - the params

getParams

public String getParams()
Returns the params parameter from this request. See setParams for details or null of params has not been set

Returns:
params

setDate

public void setDate(Date date)
Sets the 'date' parameter in this request. This can represent the date that the request was issued and is used for debugging clock-relaetd issues. The default is the time the object was created.

Parameters:
date - the date

getDate

public Date getDate()
Returns the date parameter from this request. See setDate for details.

Returns:
date

setFail

public void setFail(boolean fail)
Set the 'fail' parameter in this request. If true and the outcome of the request is anything other than success (i.e. the status code would be anything other than 200) then the WLS will return an informative error to the user no WLS Response will be created.

Parameters:
fail - boolean true to set the fail parameter in this request, false otherwise

getFail

public boolean getFail()
Returns the 'fail' parameter from this request. See setFail for details.

Returns:
current value of fail

toString

public String toString()
Returns a human-readable representation of this entire request

Returns:
a string representation of the request

toQString

public String toQString()
Returns this request in the format of a URL query string

Returns:
a string representing the request in URL query format