com.trackstudio.app.adapter.auth
Class SimpleAuthAdapter

java.lang.Object
  extended by com.trackstudio.app.adapter.auth.SimpleAuthAdapter
All Implemented Interfaces:
Adapter, AuthAdapter

public class SimpleAuthAdapter
extends java.lang.Object
implements AuthAdapter

Basic Database Authentication Adapter


Constructor Summary
SimpleAuthAdapter()
           
 
Method Summary
 boolean authorizeImpl(java.lang.String userId, java.lang.String password, boolean result)
          Do authoriztion
 void changePasswordImpl(java.lang.String userId, java.lang.String password)
          Change password for the specified user
 java.lang.String getDescription()
          Adapter's description
 boolean init()
          Initialize adapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAuthAdapter

public SimpleAuthAdapter()
Method Detail

init

public boolean init()
Description copied from interface: Adapter
Initialize adapter. TrackStudio calls this method during startup.

Specified by:
init in interface Adapter
Returns:
true when adapter initialized, false otherwise.

getDescription

public java.lang.String getDescription()
Adapter's description

Specified by:
getDescription in interface Adapter
Returns:
adapter's description

authorizeImpl

public boolean authorizeImpl(java.lang.String userId,
                             java.lang.String password,
                             boolean result)
                      throws GranException
Do authoriztion

Specified by:
authorizeImpl in interface AuthAdapter
Parameters:
userId - loaded (by login) user's id
password - password
result - if true, does nothing and return true
Returns:
true for correct password, false otherwise.
Throws:
GranException

changePasswordImpl

public void changePasswordImpl(java.lang.String userId,
                               java.lang.String password)
                        throws GranException
Change password for the specified user

Specified by:
changePasswordImpl in interface AuthAdapter
Parameters:
userId - loaded (by login) user's id
password - new password
Throws:
GranException


Copyright © 2002-2008 TrackStudio, Ltd. All Rights Reserved.