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


public interface SecurityTokenProvider

This interface defines the methods that must be implemented by security token providers.

Author:
Stefan Guilhen

Method Summary
 void cancelToken(WSTrustRequestContext context)
           Cancels the token contained in the specified request context.
 void issueToken(WSTrustRequestContext context)
           Generates a security token using the information contained in the specified request context and stores the newly-created token in the context itself.
 void renewToken(WSTrustRequestContext context)
           Renews the security token contained in the specified request context.
 void validateToken(WSTrustRequestContext context)
           Evaluates the validity of the token contained in the specified request context and sets the result in the context itself.
 

Method Detail

issueToken

void issueToken(WSTrustRequestContext context)
                throws WSTrustException

Generates a security token using the information contained in the specified request context and stores the newly-created token in the context itself.

Parameters:
context - the WSTrustRequestContext to be used when generating the token.
Throws:
WSTrustException - if an error occurs while creating the security token.

renewToken

void renewToken(WSTrustRequestContext context)
                throws WSTrustException

Renews the security token contained in the specified request context. This method is used when a previously generated token has expired, generating a new version of the same token with different expiration semantics.

Parameters:
context - the WSTrustRequestContext that contains the token to be renewed.
Throws:
WSTrustException - if an error occurs while renewing the security token.

cancelToken

void cancelToken(WSTrustRequestContext context)
                 throws WSTrustException

Cancels the token contained in the specified request context. A security token is usually canceled when one wants to make sure that the token will not be used anymore. A security token can't be renewed once it has been canceled.

Parameters:
context - the WSTrustRequestContext that contains the token to be canceled.
Throws:
WSTrustException - if an error occurs while canceling the security token.

validateToken

void validateToken(WSTrustRequestContext context)
                   throws WSTrustException

Evaluates the validity of the token contained in the specified request context and sets the result in the context itself. The result can be a status, a new token, or both.

Parameters:
context - the WSTrustRequestContext that contains the token to be validated.
Throws:
WSTrustException - if an error occurs while validating the security token.


Copyright © 2009 JBoss Inc.. All Rights Reserved.