org.webbitserver.handler.authentication
Class InMemoryPasswords

java.lang.Object
  extended by org.webbitserver.handler.authentication.InMemoryPasswords
All Implemented Interfaces:
PasswordAuthenticator

public class InMemoryPasswords
extends Object
implements PasswordAuthenticator

Implementation of PasswordAuthenticator that verifies usernames and password from a prepopulated hashmap.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.webbitserver.handler.authentication.PasswordAuthenticator
PasswordAuthenticator.ResultCallback
 
Constructor Summary
InMemoryPasswords()
           
 
Method Summary
 InMemoryPasswords add(String username, String password)
           
 void authenticate(HttpRequest request, String username, String password, PasswordAuthenticator.ResultCallback callback, Executor handlerExecutor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryPasswords

public InMemoryPasswords()
Method Detail

add

public InMemoryPasswords add(String username,
                             String password)

authenticate

public void authenticate(HttpRequest request,
                         String username,
                         String password,
                         PasswordAuthenticator.ResultCallback callback,
                         Executor handlerExecutor)
Specified by:
authenticate in interface PasswordAuthenticator


Copyright © 2012. All Rights Reserved.