Package org.apache.rahas.client
Class STSClient
java.lang.Object
org.apache.rahas.client.STSClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(org.apache.axis2.description.Parameter param) booleancancelToken(String issuerAddress, String tokenId, String action) Cancel a particular security tokenprotected org.apache.axiom.om.OMElementcreateIssueRequest(String appliesTo) This creates a request security token (RST) message.protected TokenprocessIssueResponse(int version, org.apache.axiom.om.OMElement result, String issuerAddress) Processes the response from Token issuer.booleanrenewToken(String tokenId, String issuerAddress, org.apache.neethi.Policy issuerPolicy) booleanrenewToken(String tokenId, String issuerAddress, org.apache.neethi.Policy issuerPolicy, TokenStorage store) Renews the token referenced by the token id, updates the token storerequestSecurityToken(org.apache.neethi.Policy servicePolicy, String issuerAddress, org.apache.neethi.Policy issuerPolicy, String appliesTo) voidvoidsetAddressingNs(String addressingNs) voidsetAlgorithmSuite(AlgorithmSuite algorithmSuite) This can be used in the case where the AlgorithmSuite is not specified in the given policy.voidsetCryptoInfo(org.apache.wss4j.common.crypto.Crypto crypto, String privKeyPasswd) Sets the crypto information required to process the RSTR.voidsetCryptoInfo(org.apache.wss4j.common.crypto.Crypto crypto, CallbackHandler cbHandler) Sets the crypto information required to process the RSTR.voidsetOptions(org.apache.axis2.client.Options options) voidsetRstTemplate(org.apache.axiom.om.OMElement rstTemplate) voidsetSoapVersion(String soapVersion) voidsetTrust10(Trust10 trust10) Set this to set the entropy configurations.voidsetTrust13(Trust13 trust13) Set this to set the entropy configurations.voidsetTtl(int ttl) voidsetVersion(int version) booleanvalidateToken(String tokenId, String issuerAddress, org.apache.neethi.Policy issuerPolicy)
-
Constructor Details
-
STSClient
- Throws:
TrustException
-
-
Method Details
-
requestSecurityToken
public Token requestSecurityToken(org.apache.neethi.Policy servicePolicy, String issuerAddress, org.apache.neethi.Policy issuerPolicy, String appliesTo) throws TrustException - Throws:
TrustException
-
cancelToken
public boolean cancelToken(String issuerAddress, String tokenId, 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(String tokenId, String issuerAddress, org.apache.neethi.Policy issuerPolicy) throws TrustException - Throws:
TrustException
-
renewToken
public boolean renewToken(String tokenId, String issuerAddress, org.apache.neethi.Policy issuerPolicy) throws TrustException - Throws:
TrustException
-
renewToken
public boolean renewToken(String tokenId, String issuerAddress, org.apache.neethi.Policy issuerPolicy, TokenStorage store) throws TrustException Renews the token referenced by the token id, updates the token store- Parameters:
tokenId-issuerAddress-issuerPolicy-store-- Returns:
- status
- Throws:
TrustException
-
processIssueResponse
protected Token processIssueResponse(int version, org.apache.axiom.om.OMElement result, String issuerAddress) throws TrustException Processes the response from Token issuer.- Parameters:
version- The supported version.result- Resulting token response from token issuer.issuerAddress- The respective token applying entity (as a url)- Returns:
- The issued token.
- Throws:
TrustException- If an error occurred while extracting token from response.
-
createIssueRequest
This creates a request security token (RST) message.- Parameters:
appliesTo- The address which token is applicable to.- Returns:
- The axiom object representation of RST.
- Throws:
TrustException- If an error occurred while creating the RST.
-
setTrust10
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.
-
setTrust13
Set this to set the entropy configurations. If this is provided in the given policy it will be overridden.- Parameters:
trust13- The trust13 to set.
-
setAlgorithmSuite
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
- Parameters:
addressingNs- The addressingNs to set.
-
setTtl
public void setTtl(int ttl) - Parameters:
ttl- The ttl to set.
-
setCryptoInfo
Sets the crypto information required to process the RSTR.- Parameters:
crypto- Crypto informationcbHandler- Callback handler to provide the private key password to decrypt
-
setCryptoInfo
Sets the crypto information required to process the RSTR.- Parameters:
crypto- The crypto informationprivKeyPasswd- Private key password to decrypt
-
setAction
- 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
-
addParameter
public void addParameter(org.apache.axis2.description.Parameter param)
-