org.n52.security.authentication
Interface AuthenticationService

All Known Implementing Classes:
JAASAuthenticationService

public interface AuthenticationService

Interface AuthenticationService encapsulates common methods to perform a login.

A AuthenticationService is responsible to create AuthenticationContext instances and perform logins and logouts.

Version:
$Revision: $
Author:
Marko Reiprecht Created on 18.07.2008

Method Summary
 AuthenticationContext createAuthenticationContext()
          Method creates a new AuthenticationContext.
 AuthenticationContext login()
          Method performs a "anonymous" login.
 AuthenticationContext login(javax.security.auth.callback.CallbackHandler handler)
          Method performs a login.
 AuthenticationContext login(javax.security.auth.callback.CallbackHandler handler, AuthenticationContext ctx)
          Method performs a login with a given authentication context.
 AuthenticationContext logout(AuthenticationContext ctx)
          Method performs a logout.
 

Method Detail

createAuthenticationContext

AuthenticationContext createAuthenticationContext()
Method creates a new AuthenticationContext. The context will be in state not authenticated and contain an empty Subject.

Returns:
AuthenticationContext.

login

AuthenticationContext login()
                            throws AuthenticationException
Method performs a "anonymous" login. The behavior of this mehtod is implementation dependend.

The semantic is that somebody tries to login without any credentials, so an implementation can throw an error or create an "anonymous" AuthenticationContext.

Returns:
AuthenticationContext.
Throws:
AuthenticationException - if error occurs.

login

AuthenticationContext login(javax.security.auth.callback.CallbackHandler handler)
                            throws AuthenticationException
Method performs a login. Credentials and other informations required to successfull execute the login are provided by an callback handler instance.

Parameters:
handler - the handler.
Returns:
AuthenticationContext.
Throws:
AuthenticationException - if error occurs.

login

AuthenticationContext login(javax.security.auth.callback.CallbackHandler handler,
                            AuthenticationContext ctx)
                            throws AuthenticationException
Method performs a login with a given authentication context.

Credentials and other informations required to successfull execute the login are provided by an callback handler instance.

Parameters:
handler - the handler.
ctx - the ctx.
Returns:
AuthenticationContext.
Throws:
AuthenticationException - if error occurs.

logout

AuthenticationContext logout(AuthenticationContext ctx)
                             throws AuthenticationException
Method performs a logout.

Parameters:
ctx - the ctx.
Returns:
AuthenticationContext.
Throws:
AuthenticationException - if error occurs.


Copyright © 2004-2009 52north.org. All Rights Reserved.