g-Eclipse
Release 1.0.0

eu.geclipse.core.auth
Interface IAuthenticationTokenDescription


public interface IAuthenticationTokenDescription

This interface is the base for all classes that describe specialised authentication tokens like grid proxies.


Method Summary
 IAuthenticationToken createToken()
          Create a token from this IAuthenticationTokenDescription.
 java.lang.String getTokenTypeName()
          Get the name of the token type that is described by this description.
 java.lang.String getWizardId()
          Returns the id of the wizard to be shown in the WizardSelectionPage of the authorization token wizard.
 boolean matches(IAuthenticationTokenDescription otherToken)
          Determine if this token matches the specified one.
 

Method Detail

createToken

IAuthenticationToken createToken()
                                 throws AuthenticationException
Create a token from this IAuthenticationTokenDescription. This method should never be called directly. Use instead AuthenticationTokenManager.createToken(IAuthenticationTokenDescription) within the core or the IAuthTokenProvider from outside the core to get a valid authentication token.

Returns:
A new authentication token that is created from the settings of this IAuthenticationTokenDescription.
Throws:
AuthenticationException - If the token could not be created due to some error.

getTokenTypeName

java.lang.String getTokenTypeName()
Get the name of the token type that is described by this description. This is a short name like "Grid Proxy" or "VOMS Proxy" that is used in UI components to reference this description.

Returns:
The name of the type of tokens that is described by this description.

getWizardId

java.lang.String getWizardId()
Returns the id of the wizard to be shown in the WizardSelectionPage of the authorization token wizard.

Returns:
the wizard for this token type.

matches

boolean matches(IAuthenticationTokenDescription otherToken)
Determine if this token matches the specified one. Implementations have to test all available parameters of a token. Parameters that are null within this token are not checked against the other token. All other parameters have to be not zero for the other token and have to be the same for both tokens. Note that this behaviour is not reflexive, a.matches(b) can be true while b.matches(a) is not.

Parameters:
otherToken - The token to be checked against this token.
Returns:
true if all non-null parameters of this token match the parameters of the specified token.

g-Eclipse
Release 1.0.0