g-Eclipse
Release 1.0.0

eu.geclipse.core.auth
Interface IAuthTokenProvider

All Known Implementing Classes:
AbstractAuthTokenProvider, CoreAuthTokenProvider, UIAuthTokenProvider

public interface IAuthTokenProvider

This interface is the base for all authentication token providers. It is included in the authentication management extension point but it is not recommended to extend this mechanism since there are two existing extensions (core and ui) that should fit all needs.

Authentication token providers are the central point for all non-core plugin to request authentication tokens. These non-core classes should not make use of the AuthenticationTokenManager.


Method Summary
 IAuthenticationToken requestToken()
          Request any authentication token.
 IAuthenticationToken requestToken(AuthTokenRequest request)
          Request an authentication token of the specified type.
 

Method Detail

requestToken

IAuthenticationToken requestToken()
                                  throws ProblemException
Request any authentication token. The requested token can have any type. This is a shortcut for requestToken( null ).

Returns:
Any token that could be found. In fact the currently defined default token is returned.
Throws:
ProblemException - If a problem occured during the token request. This exception with the ICoreProblems.AUTH_TOKEN_REQUEST_CANCELED id is especially thrown if the token request was canceled by the user.

requestToken

IAuthenticationToken requestToken(AuthTokenRequest request)
                                  throws ProblemException
Request an authentication token of the specified type. If the default token is not of the specified type but an appropriate token could be found this token will be set to be the new default token.

Parameters:
request - A token request that is used to determine the type of the token that is requested.
Returns:
A token that matches the specified token description.
Throws:
ProblemException - If a problem occured during the token request. This exception with the ICoreProblems.AUTH_TOKEN_REQUEST_CANCELED id is especially thrown if the token request was canceled by the user.

g-Eclipse
Release 1.0.0