Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.sasl
Class DefaultAuthorizationPolicy

java.lang.Object
  extended by org.jivesoftware.wildfire.sasl.AbstractAuthorizationPolicy
      extended by org.jivesoftware.wildfire.sasl.DefaultAuthorizationPolicy
All Implemented Interfaces:
AuthorizationProvider

public class DefaultAuthorizationPolicy
extends AbstractAuthorizationPolicy
implements AuthorizationProvider

This policy will authorize any principal that matches exactly the full JID (REALM and server name must be the same if using GSSAPI) or any principal that matches exactly the username (without REALM or server name). This does exactly what users expect if not supplying a seperate principal for authentication.

Author:
Jay Kline

Constructor Summary
DefaultAuthorizationPolicy()
           
 
Method Summary
 boolean authorize(String username, String principal)
          Returns true if the principal is explicity authorized to the JID
 String description()
          Returns a description of the Policy
 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

DefaultAuthorizationPolicy

public DefaultAuthorizationPolicy()
Method Detail

authorize

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

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

name

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

Specified by:
name in class AbstractAuthorizationPolicy
Returns:
The short name of the Policy

description

public String description()
Returns a description of the Policy

Specified by:
description in class AbstractAuthorizationPolicy
Returns:
The description of the Policy.

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.