org.talika.tarsis.security.memory
Class MemoryAuthenticator

java.lang.Object
  extended by org.talika.tarsis.service.AbstractService
      extended by org.talika.tarsis.security.AuthenticatorService
          extended by org.talika.tarsis.security.memory.MemoryAuthenticator
All Implemented Interfaces:
Authenticator, Service

public final class MemoryAuthenticator
extends AuthenticatorService

XML/Memory implementation of Authenticator interface.

Version:
$Revision: 269 $
Author:
Jose M. Palomar

Constructor Summary
MemoryAuthenticator()
          Creates a new MemoryAuthenticator.
 
Method Summary
 java.lang.String getName()
          Returns name of service.
 void init(Context context)
          Called by the framework to indicate that is being placed into service.
 SecuritySession login(java.lang.String username, java.lang.String password)
          Checks if given user and password are correct.
 
Methods inherited from class org.talika.tarsis.service.AbstractService
destroy, getContext, getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryAuthenticator

public MemoryAuthenticator()
Creates a new MemoryAuthenticator.

Method Detail

init

public void init(Context context)
          throws ServiceException
Called by the framework to indicate that is being placed into service.

Load users from XML file.

Specified by:
init in interface Service
Overrides:
init in class AbstractService
Parameters:
context - Context context that initialized service.
Throws:
ServiceException - if an exception has occurred that interferes with the services's normal operation
See Also:
Service.init(Context)

getName

public java.lang.String getName()
Returns name of service.

Specified by:
getName in interface Service
Specified by:
getName in class AbstractService
Returns:
String name of service.
See Also:
Service.getName()

login

public SecuritySession login(java.lang.String username,
                             java.lang.String password)
                      throws AuthenticationFailedException
Checks if given user and password are correct.

Specified by:
login in interface Authenticator
Specified by:
login in class AuthenticatorService
Parameters:
username - String user name.
password - String user password.
Returns:
SecuritySession security session created from given user and password.
Throws:
AuthenticationFailedException - if user and/or password aren't correct.
See Also:
Authenticator.login(String, String)


Copyright © 2002-2012 Talika Open Source Group. All Rights Reserved.