org.apache.ws.sandbox.security.trust.message.token
Class IssueRequestSecurityToken

java.lang.Object
  extended byorg.apache.ws.sandbox.security.trust.message.token.AbstractToken
      extended byorg.apache.ws.sandbox.security.trust.message.token.CompositeElement
          extended byorg.apache.ws.sandbox.security.trust.message.token.RequestSecurityToken
              extended byorg.apache.ws.sandbox.security.trust.message.token.IssueRequestSecurityToken

public class IssueRequestSecurityToken
extends RequestSecurityToken

This is the class to be used to enerate a RequestSecurityToken for the RST issuance binding Some additional child elements are provided for the convenience of the developer to carry out an issue request

Author:
Ruchith Fernando (ruchith.fernando@gmail.com)
See Also:
TrustConstants.ISSUE_SECURITY_TOKEN

Field Summary
 
Fields inherited from class org.apache.ws.sandbox.security.trust.message.token.RequestSecurityToken
requestTypeElement, TOKEN, tokenTypeElement
 
Fields inherited from class org.apache.ws.sandbox.security.trust.message.token.AbstractToken
document, element
 
Constructor Summary
IssueRequestSecurityToken(org.w3c.dom.Document doc)
           
IssueRequestSecurityToken(org.w3c.dom.Element elem)
           
 
Method Summary
 AppliesTo getAppliesToElement()
          Returns the AppliesTo element
 Claims getClaimsElement()
          Returns the Claims element
 Entropy getEntropyElement()
          Returns the Entropy element
 KeySize getKeySizeElement()
          Returns the KeySize element
 Lifetime getLifetimeElement()
          Returns the Lifetime
 Renewing getRenewingElement()
          Returns the Renewing element
protected  void handleSpecificChildren(org.w3c.dom.Element elem)
          Handle the serialization of child elements specific to this type
 void setAppliesTo(java.lang.String appliesTo)
          Sets the wst:AppliesTo value of the wst:RequestSecurityToken
 void setClaims(java.lang.String dialectURI, org.w3c.dom.Element claimsElement)
          Sets the values of the wst:Claims element of the wst:RequestSecurityToken
 void setClaims(java.lang.String dialectURI, org.w3c.dom.NodeList claims)
          Sets a set of claims
 void setClaimsDialectAttr(java.lang.String dialectURI)
          Sets the dialect attribute value of the wst:Claims element
 void setEntropy(java.lang.String binarySecretType, java.lang.String entropyValue)
          Sets the wst:Entropy/wst:BinarySecret value and wst:Entropy/wst:BinarySecret@Type of the wst:RequestSecurityToken
 void setEntropyNonce(java.lang.String nonceValue)
          Sets the binary secret of the Entropy element when the its of type Nonce
 void setKeySize(int size)
          Sets the wst:KeySize value of the wst:RequestSecurityToken
 void setLifetime(int duration)
          Adds a wst:Lifetime element with the given duration to the wst:RequestSecurityToken
 void setRenewing(boolean allow, boolean ok)
          Sets the wst:Renewing element of the wst:RequestSecurityToken
 
Methods inherited from class org.apache.ws.sandbox.security.trust.message.token.RequestSecurityToken
addAttribute, addToken, deserializeChildElement, getAttributeValue, getElement, getRequesType, getToken, getTokensByTagNameNS, getTokenType, setContextAttr, setRequestType, setTokenType
 
Methods inherited from class org.apache.ws.sandbox.security.trust.message.token.CompositeElement
setElementTextValue
 
Methods inherited from class org.apache.ws.sandbox.security.trust.message.token.AbstractToken
addChild, parse, removeChild, setElement, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IssueRequestSecurityToken

public IssueRequestSecurityToken(org.w3c.dom.Document doc)
Parameters:
doc -

IssueRequestSecurityToken

public IssueRequestSecurityToken(org.w3c.dom.Element elem)
                          throws WSTrustException
Parameters:
elem -
Throws:
WSSecurityException
WSTrustException
Method Detail

setAppliesTo

public void setAppliesTo(java.lang.String appliesTo)
Sets the wst:AppliesTo value of the wst:RequestSecurityToken

Parameters:
appliesTo - The wst:AppliesTo/wsa:EndpointReference as a String

setEntropy

public void setEntropy(java.lang.String binarySecretType,
                       java.lang.String entropyValue)
Sets the wst:Entropy/wst:BinarySecret value and wst:Entropy/wst:BinarySecret@Type of the wst:RequestSecurityToken

Parameters:
binarySecretType -
entropyValue -

setEntropyNonce

public void setEntropyNonce(java.lang.String nonceValue)
Sets the binary secret of the Entropy element when the its of type Nonce

See Also:
BinarySecret#NONCE_VAL

setLifetime

public void setLifetime(int duration)
Adds a wst:Lifetime element with the given duration to the wst:RequestSecurityToken

Parameters:
duration -

setKeySize

public void setKeySize(int size)
Sets the wst:KeySize value of the wst:RequestSecurityToken

Parameters:
size -

setClaims

public void setClaims(java.lang.String dialectURI,
                      org.w3c.dom.Element claimsElement)
Sets the values of the wst:Claims element of the wst:RequestSecurityToken

Parameters:
dialectURI -
claimsElement - An Element representing a claim

setClaims

public void setClaims(java.lang.String dialectURI,
                      org.w3c.dom.NodeList claims)
Sets a set of claims

Parameters:
dialectURI -
claims -

setClaimsDialectAttr

public void setClaimsDialectAttr(java.lang.String dialectURI)
Sets the dialect attribute value of the wst:Claims element

Parameters:
dialectURI -

setRenewing

public void setRenewing(boolean allow,
                        boolean ok)
Sets the wst:Renewing element of the wst:RequestSecurityToken

Parameters:
allow -
ok -

getAppliesToElement

public AppliesTo getAppliesToElement()
Returns the AppliesTo element

Returns:

getClaimsElement

public Claims getClaimsElement()
Returns the Claims element

Returns:

getEntropyElement

public Entropy getEntropyElement()
Returns the Entropy element

Returns:

getKeySizeElement

public KeySize getKeySizeElement()
Returns the KeySize element

Returns:

getLifetimeElement

public Lifetime getLifetimeElement()
Returns the Lifetime

Returns:

getRenewingElement

public Renewing getRenewingElement()
Returns the Renewing element

Returns:

handleSpecificChildren

protected void handleSpecificChildren(org.w3c.dom.Element elem)
                               throws WSTrustException
Handle the serialization of child elements specific to this type

Specified by:
handleSpecificChildren in class RequestSecurityToken
Parameters:
elem -
Throws:
WSTrustException
See Also:
RequestSecurityToken.handleSpecificChildren(org.w3c.dom.Element)


Copyright © 2004-2008 Apache Web Services. All Rights Reserved.