PicketLink Federation Core 2.1.6.Final-redhat-2

org.picketlink.identity.federation.core.wstrust
Class StandardRequestHandler

java.lang.Object
  extended by org.picketlink.identity.federation.core.wstrust.StandardRequestHandler
All Implemented Interfaces:
WSTrustRequestHandler

public class StandardRequestHandler
extends Object
implements WSTrustRequestHandler

Default implementation of the WSTrustRequestHandler interface. It creates the request context containing the original WS-Trust request as well as any information that may be relevant to the token processing, and delegates the actual token handling processing to the appropriate SecurityTokenProvider.

Author:
Stefan Guilhen, Alessio Soldano

Constructor Summary
StandardRequestHandler()
           
 
Method Summary
 RequestSecurityTokenResponse cancel(RequestSecurityToken request, Principal callerPrincipal)
           Cancels the security token as specified in the request message.
 void initialize(STSConfiguration configuration)
           Initializes the concrete WSTrustRequestHandler instance.
 RequestSecurityTokenResponse issue(RequestSecurityToken request, Principal callerPrincipal)
           Generates a security token according to the information specified in the request message and returns the created token in the response.
 Document postProcess(Document rstrDocument, RequestSecurityToken request)
          Perform Post Processing on the generated RSTR Collection Document Steps such as signing and encryption need to be done here.
 RequestSecurityTokenResponse renew(RequestSecurityToken request, Principal callerPrincipal)
           Renews the security token as specified in the request message, returning the renewed token in the response.
 RequestSecurityTokenResponse validate(RequestSecurityToken request, Principal callerPrincipal)
           Validates the security token as specified in the request message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardRequestHandler

public StandardRequestHandler()
Method Detail

initialize

public void initialize(STSConfiguration configuration)
Description copied from interface: WSTrustRequestHandler

Initializes the concrete WSTrustRequestHandler instance.

Specified by:
initialize in interface WSTrustRequestHandler
Parameters:
configuration - a reference to object that contains the STS configuration.

issue

public RequestSecurityTokenResponse issue(RequestSecurityToken request,
                                          Principal callerPrincipal)
                                   throws WSTrustException
Description copied from interface: WSTrustRequestHandler

Generates a security token according to the information specified in the request message and returns the created token in the response.

Specified by:
issue in interface WSTrustRequestHandler
Parameters:
request - the security token request message.
callerPrincipal - the Principal of the ws-trust token requester.
Returns:
a RequestSecurityTokenResponse containing the generated token.
Throws:
WSTrustException - if an error occurs while handling the request message.

renew

public RequestSecurityTokenResponse renew(RequestSecurityToken request,
                                          Principal callerPrincipal)
                                   throws WSTrustException
Description copied from interface: WSTrustRequestHandler

Renews the security token as specified in the request message, returning the renewed token in the response.

Specified by:
renew in interface WSTrustRequestHandler
Parameters:
request - the request message that contains the token to be renewed.
callerPrincipal - the Principal of the ws-trust token requester.
Returns:
a RequestSecurityTokenResponse containing the renewed token.
Throws:
WSTrustException - if an error occurs while handling the renewal process.

validate

public RequestSecurityTokenResponse validate(RequestSecurityToken request,
                                             Principal callerPrincipal)
                                      throws WSTrustException
Description copied from interface: WSTrustRequestHandler

Validates the security token as specified in the request message.

Specified by:
validate in interface WSTrustRequestHandler
Parameters:
request - the request message that contains the token to be validated.
callerPrincipal - the Principal of the ws-trust token requester.
Returns:
a RequestSecurityTokenResponse containing the validation status or a new token.
Throws:
WSTrustException - if an error occurs while handling the validation process.

cancel

public RequestSecurityTokenResponse cancel(RequestSecurityToken request,
                                           Principal callerPrincipal)
                                    throws WSTrustException
Description copied from interface: WSTrustRequestHandler

Cancels the security token as specified in the request message.

Specified by:
cancel in interface WSTrustRequestHandler
Parameters:
request - the request message that contains the token to be canceled.
callerPrincipal - the Principal of the ws-trust token requester.
Returns:
a RequestSecurityTokenResponse indicating whether the token has been canceled or not.
Throws:
WSTrustException - if an error occurs while handling the cancellation process.

postProcess

public Document postProcess(Document rstrDocument,
                            RequestSecurityToken request)
                     throws WSTrustException
Description copied from interface: WSTrustRequestHandler
Perform Post Processing on the generated RSTR Collection Document Steps such as signing and encryption need to be done here.

Specified by:
postProcess in interface WSTrustRequestHandler
Returns:
Throws:
WSTrustException

PicketLink Federation Core 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.