Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.sasl
Class AbstractAuthorizationPolicy

java.lang.Object
  extended by org.jivesoftware.wildfire.sasl.AbstractAuthorizationPolicy
All Implemented Interfaces:
AuthorizationProvider
Direct Known Subclasses:
DefaultAuthorizationPolicy, LazyAuthorizationPolicy, StrictAuthorizationPolicy

public abstract class AbstractAuthorizationPolicy
extends Object
implements AuthorizationProvider

Provider for authorization policies. Policy decisions are not based on any storage or specific options. They are ment to be broad sweeping policies, and are often implemented with a simple pattern matching algorithm. For a large majority of sites, a policy will be all that is required. Users that wish to integrate with their own authorization system must extend this class and implement the AuthorizationProvider interface then register the class with Wildfire in the wildfire.xml file. An entry in that file would look like the following:

   <provider>
     <authorizationpolicy>
       <classlist>com.foo.auth.CustomPolicyProvider</classlist>
     </authorizationpolicy>
   </provider>

Author:
Jay Kline

Constructor Summary
AbstractAuthorizationPolicy()
           
 
Method Summary
abstract  boolean authorize(String username, String principal)
          Returns true if the principal is explicity authorized to the JID
abstract  String description()
          Returns a description of the Policy
abstract  String name()
          Returns the short name of the Policy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAuthorizationPolicy

public AbstractAuthorizationPolicy()
Method Detail

authorize

public abstract boolean authorize(String username,
                                  String principal)
Returns true if the principal is explicity authorized to the JID

Specified by:
authorize in interface AuthorizationProvider
Parameters:
username - The username requested.
principal - The principal requesting the username.
Returns:
true is the user is authorized to be principal

name

public abstract String name()
Returns the short name of the Policy

Returns:
The short name of the Policy

description

public abstract String description()
Returns a description of the Policy

Returns:
The description of the Policy.

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.