public class WSTrustClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WSTrustClient.SecurityInfo |
| Constructor and Description |
|---|
WSTrustClient(String serviceName,
String port,
String[] endpointURIs,
WSTrustClient.SecurityInfo secInfo) |
WSTrustClient(String serviceName,
String port,
String endpointURI,
WSTrustClient.SecurityInfo secInfo) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelToken(Element token)
This method sends a WS-Trust cancel message to the STS in order to cancel (revoke) the specified security token.
|
Element |
issueToken(RequestSecurityToken request)
Issues a security token using the specified
RequestSecurityToken object. |
Element |
issueToken(String tokenType)
This method will send a RequestSecurityToken with a RequestType of issue and the passed-in tokenType identifies the type
of token to be issued by the STS.
|
Element |
issueToken(String endpointURI,
String tokenType)
Issues a Security Token from the STS.
|
Element |
issueTokenForEndpoint(String endpointURI)
This method will send a RequestSecurityToken with a RequestType of issue and the passed-in endpointURI identifies 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)
This method will send a RequestSecurityToken with a RequestType of renew and the passed-in tokenType identifies the type
of token to be renewed by the STS.
|
boolean |
validateToken(Element token)
This method will send a RequestSecurityToken with a RequestType of validated by the STS.
|
public WSTrustClient(String serviceName, String port, String endpointURI, WSTrustClient.SecurityInfo secInfo) throws org.picketlink.common.exceptions.ParsingException
org.picketlink.common.exceptions.ParsingExceptionpublic WSTrustClient(String serviceName, String port, String[] endpointURIs, WSTrustClient.SecurityInfo secInfo) throws org.picketlink.common.exceptions.ParsingException
org.picketlink.common.exceptions.ParsingExceptionpublic Element issueToken(String tokenType) throws org.picketlink.common.exceptions.fed.WSTrustException
tokenType - - The type of token to be issued.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.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 security token to be issued.principal - - The Principal on behalf of whom the token is to be issued.Element representing the issued security token.org.picketlink.common.exceptions.fed.WSTrustException - if a processing error occurs while issuing the security token.public Element issueToken(RequestSecurityToken request) throws org.picketlink.common.exceptions.fed.WSTrustException
Issues a security token using the specified RequestSecurityToken object.
request - an instance of RequestSecurityToken that contains the WS-Trust request information.Element representing the issued security token.IllegalArgumentException - if the specified request is null.org.picketlink.common.exceptions.fed.WSTrustException - if a processing error occurs while issuing the token.public Element renewToken(String tokenType, Element token) throws org.picketlink.common.exceptions.fed.WSTrustException
tokenType - - The type of token to be renewed.token - - The security token to be renewed.org.picketlink.common.exceptions.fed.WSTrustExceptionpublic boolean validateToken(Element token) throws org.picketlink.common.exceptions.fed.WSTrustException
token - - The security token to be validated.org.picketlink.common.exceptions.fed.WSTrustExceptionpublic boolean cancelToken(Element token) throws org.picketlink.common.exceptions.fed.WSTrustException
This method sends a WS-Trust cancel message to the STS in order to cancel (revoke) the specified security token.
token - the security token to be canceled.true if the token was successfully canceled; false otherwise.org.picketlink.common.exceptions.fed.WSTrustException - if an error occurs while canceling the security token.Copyright © 2013 JBoss Inc.. All Rights Reserved.