org.jboss.identity.federation.api.wstrust
Interface WSTrustRequestHandler

All Known Implementing Classes:
JBossRequestHandler

public interface WSTrustRequestHandler

The WSTrustRequestHandler interface defines the methods that will be responsible for handling the different types of WS-Trust request messages.

Author:
Stefan Guilhen

Method Summary
 RequestSecurityTokenResponse cancel(RequestSecurityToken request, javax.xml.ws.handler.MessageContext context)
           Cancels the security token as specified in the request message.
 void initialize(STSConfiguration configuration)
           Initializes the concrete WSTrustRequestHandler instance.
 RequestSecurityTokenResponse issue(RequestSecurityToken request, javax.xml.ws.handler.MessageContext context)
           Generates a security token according to the information specified in the request message and returns the created token in the response.
 RequestSecurityTokenResponse renew(RequestSecurityToken request, javax.xml.ws.handler.MessageContext context)
           Renews the security token as specified in the request message, returning the renewed token in the response.
 RequestSecurityTokenResponse validate(RequestSecurityToken request, javax.xml.ws.handler.MessageContext context)
           Validates the security token as specified in the request message.
 

Method Detail

initialize

void initialize(STSConfiguration configuration)

Initializes the concrete WSTrustRequestHandler instance.

Parameters:
configuration - a reference to object that contains the STS configuration.

issue

RequestSecurityTokenResponse issue(RequestSecurityToken request,
                                   javax.xml.ws.handler.MessageContext context)
                                   throws WSTrustException

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

Parameters:
request - the security token request message.
context - the context of the token request message. The context provides information that may be relevant to the request processing, such as the subject of the caller.
Returns:
a RequestSecurityTokenResponse containing the generated token.
Throws:
WSTrustException - if an error occurs while handling the request message.

renew

RequestSecurityTokenResponse renew(RequestSecurityToken request,
                                   javax.xml.ws.handler.MessageContext context)
                                   throws WSTrustException

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

Parameters:
request - the request message that contains the token to be renewed.
context - the context of the token request message. The context provides information that may be relevant to the request processing, such as the subject of the caller.
Returns:
a RequestSecurityTokenResponse containing the renewed token.
Throws:
WSTrustException - if an error occurs while handling the renewal process.

cancel

RequestSecurityTokenResponse cancel(RequestSecurityToken request,
                                    javax.xml.ws.handler.MessageContext context)
                                    throws WSTrustException

Cancels the security token as specified in the request message.

Parameters:
request - the request message that contains the token to be canceled.
context - the context of the token request message. The context provides information that may be relevant to the request processing, such as the subject of the caller.
Returns:
a RequestSecurityTokenResponse indicating whether the token has been canceled or not.
Throws:
WSTrustException - if an error occurs while handling the cancellation process.

validate

RequestSecurityTokenResponse validate(RequestSecurityToken request,
                                      javax.xml.ws.handler.MessageContext context)
                                      throws WSTrustException

Validates the security token as specified in the request message.

Parameters:
request - the request message that contains the token to be validated.
context - the context of the token request message. The context provides information that may be relevant to the request processing, such as the subject of the caller.
Returns:
a RequestSecurityTokenResponse containing the validation status or a new token.
Throws:
WSTrustException - if an error occurs while handling the validation process.


Copyright © 2009 JBoss Inc.. All Rights Reserved.