com.sun.identity.liberty.ws.authnsvc.protocol
Class SASLResponse

java.lang.Object
  extended by com.sun.identity.liberty.ws.authnsvc.protocol.SASLResponse

public class SASLResponse
extends Object

The SASLResponse class represents SASLResponse element defined in Authentication Service schema.


Field Summary
static String ABORT
          Abort status where the server is aborting the authentication exchange.
static String CONTINUE
          Continue status where the server expects the client to send another SASLRequest
static String OK
          OK status where the server considers the authentication exchange to have successfully completed.
 
Constructor Summary
SASLResponse(Element element)
          Constructs a SASLResponse with a org.w3c.dom.Element.
SASLResponse(String statusCode)
          Constructs a SASLResponse instance.
 
Method Summary
 List getCredentials()
          Returns a list of child Element of 'Credentials' Element.
 byte[] getData()
          Returns value of Element 'Data'.
 String getId()
          Returns value of id attribute.
 String getMessageID()
          Returns value of messageID attribute of CorrelationHeader.
 PasswordTransforms getPasswordTransforms()
          Returns child Element 'PasswordTransforms'.
 String getRefToMessageID()
          Returns value of refToMessageID attribute of CorrelationHeader.
 ResourceOffering getResourceOffering()
          Returns Element ResourceOffering.
 String getServerMechanism()
          Returns value of serverMechanism attribute.
 String getStatusCode()
          Returns value of attribute 'code' of Element 'Status'.
 void setCredentials(List credentials)
          Sets a list of child Elements of 'Credentials' Element.
 void setData(byte[] data)
          Sets value of Element 'Data'.
 void setId(String id)
          Sets value of id attribute.
 void setMessageID(String messageID)
          Sets value of messageID attribute of CorrelationHeader.
 void setPasswordTransforms(PasswordTransforms passwordTransforms)
          Sets child Element 'PasswordTransforms'
 void setRefToMessageID(String refToMessageID)
          Sets value of refToMessageID attribute of CorrelationHeader.
 void setResourceOffering(ResourceOffering resourceOffering)
          Sets Element ResourceOffering.
 void setServerMechanism(String serverMechanism)
          Sets value of mechanism attribute.
 void setStatusCode(String statusCode)
          Sets value of attribute 'code' of Element 'Status'.
 Element toElement()
          Returns SASLResponse in org.w3c.dom.Element format.
 

Field Detail

CONTINUE

public static final String CONTINUE
Continue status where the server expects the client to send another SASLRequest

See Also:
Constant Field Values

ABORT

public static final String ABORT
Abort status where the server is aborting the authentication exchange.

See Also:
Constant Field Values

OK

public static final String OK
OK status where the server considers the authentication exchange to have successfully completed.

See Also:
Constant Field Values
Constructor Detail

SASLResponse

public SASLResponse(String statusCode)
Constructs a SASLResponse instance.

Parameters:
statusCode - Status Code.

SASLResponse

public SASLResponse(Element element)
             throws AuthnSvcException
Constructs a SASLResponse with a org.w3c.dom.Element.

Parameters:
element - a SASLResponse element
Throws:
AuthnSvcException - if an error occurs while parsing the SASLResponse element
Method Detail

getStatusCode

public String getStatusCode()
Returns value of attribute 'code' of Element 'Status'.

Returns:
value of attribute 'code' of Element 'Status'
See Also:
SASLResponse.setStatusCode(String)

getPasswordTransforms

public PasswordTransforms getPasswordTransforms()
Returns child Element 'PasswordTransforms'.

Returns:
child Element 'PasswordTransforms'
See Also:
SASLResponse.setPasswordTransforms(PasswordTransforms)

getData

public byte[] getData()
Returns value of Element 'Data'.

Returns:
value of Element 'Data'
See Also:
SASLResponse.setData(byte[])

getResourceOffering

public ResourceOffering getResourceOffering()
Returns Element ResourceOffering.

Returns:
Element ResourceOffering.
See Also:
SASLResponse.setResourceOffering(ResourceOffering)

getCredentials

public List getCredentials()
Returns a list of child Element of 'Credentials' Element.

Returns:
a list of child Element of 'Credentials' Element
See Also:
SASLResponse.setCredentials(List)

getServerMechanism

public String getServerMechanism()
Returns value of serverMechanism attribute.

Returns:
value of serverMechanism attribute
See Also:
SASLResponse.setServerMechanism(String)

getId

public String getId()
Returns value of id attribute.

Returns:
value of id attribute
See Also:
SASLResponse.setId(String)

getMessageID

public String getMessageID()
Returns value of messageID attribute of CorrelationHeader.

Returns:
value of messageID attribute
See Also:
SASLResponse.setMessageID(String)

getRefToMessageID

public String getRefToMessageID()
Returns value of refToMessageID attribute of CorrelationHeader.

Returns:
value of refToMessageID attribute
See Also:
SASLResponse.setRefToMessageID(String)

setStatusCode

public void setStatusCode(String statusCode)
Sets value of attribute 'code' of Element 'Status'.

Parameters:
statusCode - value of attribute 'code' of Element 'Status'
See Also:
SASLResponse.getStatusCode()

setPasswordTransforms

public void setPasswordTransforms(PasswordTransforms passwordTransforms)
Sets child Element 'PasswordTransforms'

Parameters:
passwordTransforms - Element 'PasswordTransforms'
See Also:
SASLResponse.getPasswordTransforms()

setData

public void setData(byte[] data)
Sets value of Element 'Data'.

Parameters:
data - value of Element 'Data'
See Also:
SASLResponse.getData()

setResourceOffering

public void setResourceOffering(ResourceOffering resourceOffering)
Sets Element ResourceOffering.

Parameters:
resourceOffering - Element ResourceOffering
See Also:
SASLResponse.getResourceOffering()

setCredentials

public void setCredentials(List credentials)
Sets a list of child Elements of 'Credentials' Element.

Parameters:
credentials - a list of child Elements of 'Credentials' Element
See Also:
SASLResponse.getCredentials()

setServerMechanism

public void setServerMechanism(String serverMechanism)
Sets value of mechanism attribute.

Parameters:
serverMechanism - value of mechanism attribute
See Also:
SASLResponse.getServerMechanism()

setId

public void setId(String id)
Sets value of id attribute.

Parameters:
id - value of id attribute
See Also:
SASLResponse.getId()

setMessageID

public void setMessageID(String messageID)
Sets value of messageID attribute of CorrelationHeader.

Parameters:
messageID - value of messageID attribute
See Also:
SASLResponse.getMessageID()

setRefToMessageID

public void setRefToMessageID(String refToMessageID)
Sets value of refToMessageID attribute of CorrelationHeader.

Parameters:
refToMessageID - value of refToMessageID attribute
See Also:
SASLResponse.getRefToMessageID()

toElement

public Element toElement()
                  throws AuthnSvcException
Returns SASLResponse in org.w3c.dom.Element format.

Returns:
SASLResponse in org.w3c.dom.Element format.
Throws:
AuthnSvcException - if an error occurs while creating the SASLResponse element