rabbit.filter.authenticate
Class AuthUserInfo

java.lang.Object
  extended by rabbit.filter.authenticate.AuthUserInfo

public class AuthUserInfo
extends Object

Information about an authenticated user.


Constructor Summary
AuthUserInfo(String token, long timeout, InetAddress sa)
          A user has successfully managed to authenticat
 
Method Summary
 boolean correctSocketAddress(InetAddress sa)
          Check if the user is still using the same InetAddress
 boolean correctToken(String token)
          Check if the given token matches the token for this user
 boolean stillValid()
          Check if this authentication is still valid.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthUserInfo

public AuthUserInfo(String token,
                    long timeout,
                    InetAddress sa)
A user has successfully managed to authenticat

Parameters:
token - the token used
timeout - the timeout in millis
sa - the InetAddress the user came from
Method Detail

toString

public String toString()
Overrides:
toString in class Object

stillValid

public boolean stillValid()
Check if this authentication is still valid.

Returns:
true if authentication token is still valid, false otherwise

correctToken

public boolean correctToken(String token)
Check if the given token matches the token for this user

Parameters:
token - the new token to validate
Returns:
true if the tokens match, false otherwise

correctSocketAddress

public boolean correctSocketAddress(InetAddress sa)
Check if the user is still using the same InetAddress

Parameters:
sa - the new InetAddress of the user
Returns:
true if the user is still on the same InetAddress