authentication
Class SaslRequest

java.lang.Object
  extended by authentication.SaslRequest

public class SaslRequest
extends java.lang.Object

This class parses a SASL request from a SOAP message and holds it for other classes to use.

Author:
Gunn Olaussen & Kirsti N. Torgersen

Field Summary
private static long MAX_TIME_DEVIATION
           
private  java.lang.String mechanism
           
private  javax.xml.soap.SOAPMessage message
           
private  java.lang.String messageid
           
private  java.lang.String password
           
private  java.util.Date timestamp
           
private  java.lang.String userid
           
 
Constructor Summary
SaslRequest(javax.xml.soap.SOAPMessage message)
          The SaslRequest constructor.
 
Method Summary
 java.lang.String getMechanism()
           
 java.lang.String getMessageID()
           
 java.lang.String getPassword()
           
 java.util.Date getTimestamp()
           
 java.lang.String getUserID()
           
private  void parseBody(org.w3c.dom.Node node)
          Parses the contents of the SASL request recursively and retrieves the values that are needed later.
private  void parseHead(javax.xml.soap.SOAPHeader header)
          Parses and validates the header fields of the message.
 java.lang.String toString()
          Returns a string representation of this request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_TIME_DEVIATION

private static final long MAX_TIME_DEVIATION
See Also:
Constant Field Values

userid

private java.lang.String userid

messageid

private java.lang.String messageid

password

private java.lang.String password

mechanism

private java.lang.String mechanism

timestamp

private java.util.Date timestamp

message

private javax.xml.soap.SOAPMessage message
Constructor Detail

SaslRequest

public SaslRequest(javax.xml.soap.SOAPMessage message)
            throws java.lang.Exception
The SaslRequest constructor. Starts the parsing and validation of the SOAP message.

Parameters:
message - SOAPMessage The SOAP message containing the SASL request.
Throws:
java.lang.Exception - If something is wrong with the message.
Method Detail

parseHead

private void parseHead(javax.xml.soap.SOAPHeader header)
                throws java.lang.Exception
Parses and validates the header fields of the message.

Parameters:
header - SOAPHeader The header containing the header fields to be checked.
Throws:
java.lang.Exception - If there is something wrong with the header.

parseBody

private void parseBody(org.w3c.dom.Node node)
                throws java.lang.Exception
Parses the contents of the SASL request recursively and retrieves the values that are needed later.

Parameters:
node - Node The node that should be parsed next.
Throws:
java.lang.Exception - If there is something wrong with the request.

getMessageID

public java.lang.String getMessageID()
Returns:
String The message identifier of this request.

getUserID

public java.lang.String getUserID()
Returns:
String The user identifier in this request.

getPassword

public java.lang.String getPassword()
Returns:
String The password contained in the request that is supposed to authenticate the user.

getTimestamp

public java.util.Date getTimestamp()
Returns:
Date Returns the timestamp of this request as a Date object so that it is easy to compare.

getMechanism

public java.lang.String getMechanism()
Returns:
String Returns the authentication mechanism requested by this request.

toString

public java.lang.String toString()
Returns a string representation of this request.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()