org.apache.rahas.client
Class STSClient

java.lang.Object
  extended by org.apache.rahas.client.STSClient

public class STSClient
extends java.lang.Object


Constructor Summary
STSClient(org.apache.axis2.context.ConfigurationContext configCtx)
           
 
Method Summary
 boolean cancelToken(java.lang.String issuerAddress, java.lang.String tokenId, java.lang.String action)
          Cancel a particular security token
 boolean renewToken(java.lang.String tokenId, java.lang.String issuerAddress, org.apache.neethi.Policy issuerPolicy)
           
 Token requestSecurityToken(org.apache.neethi.Policy servicePolicy, java.lang.String issuerAddress, org.apache.neethi.Policy issuerPolicy, java.lang.String appliesTo)
           
 void setAction(java.lang.String action)
           
 void setAddressingNs(java.lang.String addressingNs)
           
 void setAlgorithmSuite(org.apache.ws.secpolicy.model.AlgorithmSuite algorithmSuite)
          This can be used in the case where the AlgorithmSuite is not specified in the given policy.
 void setCryptoInfo(org.apache.ws.security.components.crypto.Crypto crypto, javax.security.auth.callback.CallbackHandler cbHandler)
          Sets the crypto information required to process the RSTR.
 void setCryptoInfo(org.apache.ws.security.components.crypto.Crypto crypto, java.lang.String privKeyPasswd)
          Sets the crypto information required to process the RSTR.
 void setOptions(org.apache.axis2.client.Options options)
           
 void setRstTemplate(org.apache.axiom.om.OMElement rstTemplate)
           
 void setSoapVersion(java.lang.String soapVersion)
           
 void setTrust10(org.apache.ws.secpolicy.model.Trust10 trust10)
          Set this to set the entropy configurations.
 void setTtl(int ttl)
           
 void setVersion(int version)
           
 boolean validateToken(java.lang.String tokenId, java.lang.String issuerAddress, org.apache.neethi.Policy issuerPolicy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

STSClient

public STSClient(org.apache.axis2.context.ConfigurationContext configCtx)
          throws TrustException
Throws:
TrustException
Method Detail

requestSecurityToken

public Token requestSecurityToken(org.apache.neethi.Policy servicePolicy,
                                  java.lang.String issuerAddress,
                                  org.apache.neethi.Policy issuerPolicy,
                                  java.lang.String appliesTo)
                           throws TrustException
Throws:
TrustException

cancelToken

public boolean cancelToken(java.lang.String issuerAddress,
                           java.lang.String tokenId,
                           java.lang.String action)
                    throws TrustException
Cancel a particular security token

Parameters:
issuerAddress -
tokenId -
Returns:
true is the Token was successfully canceled. False otherwise.
Throws:
TrustException

validateToken

public boolean validateToken(java.lang.String tokenId,
                             java.lang.String issuerAddress,
                             org.apache.neethi.Policy issuerPolicy)
                      throws TrustException
Throws:
TrustException

renewToken

public boolean renewToken(java.lang.String tokenId,
                          java.lang.String issuerAddress,
                          org.apache.neethi.Policy issuerPolicy)
                   throws TrustException
Throws:
TrustException

setTrust10

public void setTrust10(org.apache.ws.secpolicy.model.Trust10 trust10)
Set this to set the entropy configurations. If this is provided in the given policy it will be overridden.

Parameters:
trust10 - The trust10 to set.

setAlgorithmSuite

public void setAlgorithmSuite(org.apache.ws.secpolicy.model.AlgorithmSuite algorithmSuite)
This can be used in the case where the AlgorithmSuite is not specified in the given policy. If the AlgorithmSuite exists in a binding in the policy then the value set will be overridden.

Parameters:
algorithmSuite - The algorithmSuite to set.

setAddressingNs

public void setAddressingNs(java.lang.String addressingNs)
Parameters:
addressingNs - The addressingNs to set.

setTtl

public void setTtl(int ttl)
Parameters:
ttl - The ttl to set.

setCryptoInfo

public void setCryptoInfo(org.apache.ws.security.components.crypto.Crypto crypto,
                          javax.security.auth.callback.CallbackHandler cbHandler)
Sets the crypto information required to process the RSTR.

Parameters:
crypto - Crypto information
cbHandler - Callback handler to provide the private key password to decrypt

setCryptoInfo

public void setCryptoInfo(org.apache.ws.security.components.crypto.Crypto crypto,
                          java.lang.String privKeyPasswd)
Sets the crypto information required to process the RSTR.

Parameters:
crypto - The crypto information
privKeyPasswd - Private key password to decrypt

setAction

public void setAction(java.lang.String action)
Parameters:
action - The action to set.

setOptions

public void setOptions(org.apache.axis2.client.Options options)
Parameters:
options - The options to set.

setRstTemplate

public void setRstTemplate(org.apache.axiom.om.OMElement rstTemplate)
Parameters:
rstTemplate - The rstTemplate to set.

setVersion

public void setVersion(int version)
Parameters:
version - The version to set.

setSoapVersion

public void setSoapVersion(java.lang.String soapVersion)