|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.authentication.JAASAuthenticationService
public class JAASAuthenticationService
Class JAASAuthenticationService implements the AuthenticationService interface by using the JAAS api.
This AuthenticationService implementation is the default implementation used within 52n-security. If you create an instance it uses the default JAAS Configuration (Configuration.getConfiguration()
and an empty application name to perform logins.
You can use the setter methods for the applicationname and the Configuration to change the behavior of this class.
Constructor Summary | |
---|---|
JAASAuthenticationService()
Constructor creates a new instance. |
Method Summary | |
---|---|
AuthenticationContext |
createAuthenticationContext()
Method creates a new AuthenticationContext. |
protected javax.security.auth.login.LoginContext |
createLoginContext(java.lang.String applicationName,
javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler handler,
javax.security.auth.login.Configuration configuration)
Method creates a LoginContext. |
java.lang.String |
getApplicationName()
Method gets the applicationName. |
javax.security.auth.login.Configuration |
getConfiguration()
Method gets the configuration. |
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. |
void |
setApplicationName(java.lang.String applicationName)
Method sets the applicationName. |
void |
setConfiguration(javax.security.auth.login.Configuration configuration)
Method sets the configuration. |
protected AuthenticationException |
wrap(javax.security.auth.login.LoginException ex)
Method converts a LoginException in a AuthenticationException. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JAASAuthenticationService()
Method Detail |
---|
public java.lang.String getApplicationName()
javax.security.auth.login.Configuration} for details about the application name.
public void setApplicationName(java.lang.String applicationName)
applicationName
- the applicationName.javax.security.auth.login.Configuration} for details about the application name.
public javax.security.auth.login.Configuration getConfiguration()
public void setConfiguration(javax.security.auth.login.Configuration configuration)
configuration
- the configuration.public AuthenticationContext createAuthenticationContext()
AuthenticationService
not authenticated
and contain an empty Subject.
createAuthenticationContext
in interface AuthenticationService
AuthenticationService.createAuthenticationContext()
public AuthenticationContext login() throws AuthenticationException
AuthenticationService
login
in interface AuthenticationService
AuthenticationException
- if error occurs.AuthenticationService.login()
public AuthenticationContext login(javax.security.auth.callback.CallbackHandler handler) throws AuthenticationException
AuthenticationService
login
in interface AuthenticationService
handler
- the handler.
AuthenticationException
- if error occurs.AuthenticationService.login(CallbackHandler)
public AuthenticationContext login(javax.security.auth.callback.CallbackHandler handler, AuthenticationContext ctx) throws AuthenticationException
AuthenticationService
login
in interface AuthenticationService
handler
- the handler.ctx
- the ctx.
AuthenticationException
- if error occurs.AuthenticationService.login(CallbackHandler, AuthenticationContext)
public AuthenticationContext logout(AuthenticationContext ctx) throws AuthenticationException
AuthenticationService
logout
in interface AuthenticationService
ctx
- the ctx.
AuthenticationException
- if error occurs.AuthenticationService.logout(AuthenticationContext)
protected javax.security.auth.login.LoginContext createLoginContext(java.lang.String applicationName, javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler, javax.security.auth.login.Configuration configuration)
applicationName
- the applicationName.subject
- the subject.handler
- the handler.configuration
- the configuration.
protected AuthenticationException wrap(javax.security.auth.login.LoginException ex)
ex
- the ex.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |