org.elkoserver.server.gatekeeper.passwd
Class PasswdAuthorizer

java.lang.Object
  extended by org.elkoserver.server.gatekeeper.passwd.PasswdAuthorizer
All Implemented Interfaces:
Authorizer

public class PasswdAuthorizer
extends Object
implements Authorizer

A simple implementation of the Authorizer interface for use with the Elko Gatekeeper.


Constructor Summary
PasswdAuthorizer()
          Constructor.
 
Method Summary
 void initialize(Gatekeeper gatekeeper)
          Initialize the authorization service.
 void reserve(String protocol, String context, String id, String name, String password, ReservationResultHandler handler)
          Service a request to make a reservation.
 void setPassword(String id, String oldPassword, String newPassword, SetPasswordResultHandler handler)
          Service a request to change a user's password.
 void shutdown()
          Shut down the authorization service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswdAuthorizer

public PasswdAuthorizer()
Constructor. Nothing to do in this case, since all the real initialization work happens in initialize().

Method Detail

initialize

public void initialize(Gatekeeper gatekeeper)
Initialize the authorization service.

Specified by:
initialize in interface Authorizer
Parameters:
gatekeeper - The Gatekeeper this object is providing authorization services for.

reserve

public void reserve(String protocol,
                    String context,
                    String id,
                    String name,
                    String password,
                    ReservationResultHandler handler)
Service a request to make a reservation. This method is called each time the Gatekeeper recieves a 'reserve' request from a client.

Specified by:
reserve in interface Authorizer
Parameters:
protocol - The protocol the reservation seeker wants to use.
context - The context they wish to enter.
id - The user who is asking for the reservation.
name - Optional legible name for the user.
password - Password tendered for entry, if relevent.
handler - Object to receive results of reservation check, once available.

setPassword

public void setPassword(String id,
                        String oldPassword,
                        String newPassword,
                        SetPasswordResultHandler handler)
Service a request to change a user's password. This method is called each time the Gatekeeper recieves a 'setpassword' request from a client.

Specified by:
setPassword in interface Authorizer
Parameters:
id - The user who is asking for this.
oldPassword - Current password, to check for permission.
newPassword - The new password.
handler - Object to receive results, when done.

shutdown

public void shutdown()
Shut down the authorization service.

Specified by:
shutdown in interface Authorizer