public interface Authorizer
The Gatekeeper does not intrinsically implement any particular means of authenticating and authorizing the users for whom it is handling reservations. Instead, it calls upon an object implementing this interface, which it instantiates at server startup time. The server takes the fully qualified class name of the class of Authorizer to instantiate from the "conf.gatekeeper.authorizer" configuration property.
In addition to implementing this interface, an Authorizer class must also provide a zero-argument constructor).
Modifier and Type | Method and Description |
---|---|
void |
initialize(Gatekeeper gatekeeper)
Do whatever initialization is required to begin issuing reservations.
|
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()
Do any work required prior to shutting down the server.
|
void initialize(Gatekeeper gatekeeper)
gatekeeper
- The Gatekeeper this Authorizer is providing
authorization services for.void reserve(String protocol, String context, String id, String name, String password, ReservationResultHandler handler)
handleReservation()
method.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.void setPassword(String id, String oldPassword, String newPassword, SetPasswordResultHandler handler)
handle()
method.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.void shutdown()
Copyright © 2017. All rights reserved.