public class STSClient extends Object
| Constructor and Description |
|---|
STSClient()
Constructor
|
STSClient(STSClientConfig config)
Constructor that creates the
Dispatch for use. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelToken(Element securityToken)
Cancels the specified security token by sending a WS-Trust cancel message to the STS.
|
Dispatch<Source> |
getDispatch()
Get the dispatch object
|
String |
getSoapBinding() |
Element |
issueToken(RequestSecurityToken request)
Issue a token
|
Element |
issueToken(String tokenType)
Issue a token
|
Element |
issueToken(String endpointURI,
String tokenType)
Issues a Security Token from the STS.
|
Element |
issueTokenForEndpoint(String endpointURI)
Issues a Security Token for the ultimate recipient of the token.
|
Element |
issueTokenOnBehalfOf(String endpointURI,
String tokenType,
Principal principal)
Issues a security token on behalf of the specified principal.
|
Element |
renewToken(String tokenType,
Element token)
Renew a token
|
void |
setDispatch(Dispatch<Source> dispatch)
Set the
Dispatch object for use |
void |
setSoapBinding(String soapBinding) |
boolean |
validateToken(Element token)
Validate a token
|
public STSClient()
#setDispatch(Dispatch)} for the setting of the {@link Dispatch} objectpublic STSClient(STSClientConfig config)
Constructor that creates the Dispatch for use.
If you need to customize the ws properties, it is suggested to preconstruct a Dispatch object and use the default
no-arg constructor followed by a setDispatch(Dispatch) call
config - public void setDispatch(Dispatch<Source> dispatch)
Dispatch object for usedispatch - public Element issueToken(String tokenType) throws org.picketlink.common.exceptions.fed.WSTrustException
tokenType - org.picketlink.common.exceptions.fed.WSTrustExceptionpublic Element issueTokenForEndpoint(String endpointURI) throws org.picketlink.common.exceptions.fed.WSTrustException
endpointURI - - The ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken
which is an optional element so it may be null.org.picketlink.common.exceptions.fed.WSTrustExceptionpublic Element issueToken(String endpointURI, String tokenType) throws org.picketlink.common.exceptions.fed.WSTrustException
endpointURI - - The ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken
which is an optional element so it may be null.tokenType - - The type of security token to be issued.IllegalArgumentException - If neither endpointURI nor tokenType was specified.org.picketlink.common.exceptions.fed.WSTrustExceptionpublic Element issueTokenOnBehalfOf(String endpointURI, String tokenType, Principal principal) throws org.picketlink.common.exceptions.fed.WSTrustException
Issues a security token on behalf of the specified principal.
endpointURI - the ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken
which is an optional element so it may be null.tokenType - the type of the token to be issued.principal - the Principal to whom the token will be issued.Element representing the issued security token.IllegalArgumentException - If neither endpointURI nor tokenType was specified.org.picketlink.common.exceptions.fed.WSTrustException - if an error occurs while issuing the security token.public Element issueToken(RequestSecurityToken request) throws org.picketlink.common.exceptions.fed.WSTrustException
request - org.picketlink.common.exceptions.fed.WSTrustExceptionpublic Element renewToken(String tokenType, Element token) throws org.picketlink.common.exceptions.fed.WSTrustException
tokenType - token - org.picketlink.common.exceptions.fed.WSTrustExceptionpublic boolean validateToken(Element token) throws org.picketlink.common.exceptions.fed.WSTrustException
token - org.picketlink.common.exceptions.fed.WSTrustExceptionpublic boolean cancelToken(Element securityToken) throws org.picketlink.common.exceptions.fed.WSTrustException
Cancels the specified security token by sending a WS-Trust cancel message to the STS.
securityToken - the security token to be canceled.true if the token has been canceled by the STS; false otherwise.org.picketlink.common.exceptions.fed.WSTrustException - if an error occurs while processing the cancel request.public String getSoapBinding()
public void setSoapBinding(String soapBinding)
Copyright © 2013 JBoss Inc.. All Rights Reserved.