org.qtunes.auth
Class BasicAuthorizer

java.lang.Object
  extended by org.qtunes.auth.BasicAuthorizer
All Implemented Interfaces:
Authorizer

public class BasicAuthorizer
extends java.lang.Object
implements Authorizer

A simple Authorizer that tests a Session aganst a SessionMatcher. If the session is found to match, the allowances specified in the constructor are granted.


Constructor Summary
BasicAuthorizer(SessionMatcher matcher, java.lang.String[] allowances)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.Collection<java.lang.String> getAllowances(Session session)
          Return the set of allowances this Authorizer will allow for the specified Session, or null if no allowances are granted.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicAuthorizer

public BasicAuthorizer(SessionMatcher matcher,
                       java.lang.String[] allowances)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getAllowances

public java.util.Collection<java.lang.String> getAllowances(Session session)
Description copied from interface: Authorizer
Return the set of allowances this Authorizer will allow for the specified Session, or null if no allowances are granted.

Specified by:
getAllowances in interface Authorizer

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object