Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.sasl
Class UnixK5LoginProvider

java.lang.Object
  extended by org.jivesoftware.wildfire.sasl.AbstractAuthorizationProvider
      extended by org.jivesoftware.wildfire.sasl.UnixK5LoginProvider
All Implemented Interfaces:
AuthorizationProvider

public class UnixK5LoginProvider
extends AbstractAuthorizationProvider
implements AuthorizationProvider

Provider for authorization. Checks if the authenticated principal is in the user's .k5login file. A traditional Unix Kerberos methodology. The location of this file can be configured in the wildfire.xml file. An entry in that file would look like the following:

   <unix>
     <k5login> /home/{0}/.k5login </k5login>
   </unix>
The string {0} will be replaced with the username.

Author:
Jay Kline

Constructor Summary
UnixK5LoginProvider()
           
 
Method Summary
 void addAuthorized(String username, Collection<String> principals)
          Always throws UnsupportedOperationException.
 void addAuthorized(String username, String principal)
          Always throws UnsupportedOperationException.
 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
 Collection<String> getAuthorized(String username)
          Returns a String Collection of principals that are authorized to use the named user.
 boolean isWritable()
          Returns false, this implementation is not writeable.
 String name()
          Returns the short name of the Policy
 void setAuthorized(String username, Collection<String> principals)
          Always throws UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnixK5LoginProvider

public UnixK5LoginProvider()
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 AbstractAuthorizationProvider
Parameters:
username - The username requested.
principal - The principal requesting the username.
Returns:
true is the user is authorized to be principal

getAuthorized

public Collection<String> getAuthorized(String username)
Returns a String Collection of principals that are authorized to use the named user.

Specified by:
getAuthorized in class AbstractAuthorizationProvider
Parameters:
username - The username.
Returns:
A String Collection of principals that are authorized.

isWritable

public boolean isWritable()
Returns false, this implementation is not writeable.

Specified by:
isWritable in class AbstractAuthorizationProvider
Returns:
False.

addAuthorized

public void addAuthorized(String username,
                          String principal)
                   throws UnsupportedOperationException
Always throws UnsupportedOperationException.

Specified by:
addAuthorized in class AbstractAuthorizationProvider
Parameters:
username - The username.
principal - The principal authorized to use the named user.
Throws:
UnsupportedOperationException - If this AuthorizationProvider cannot be updated.

addAuthorized

public void addAuthorized(String username,
                          Collection<String> principals)
                   throws UnsupportedOperationException
Always throws UnsupportedOperationException.

Specified by:
addAuthorized in class AbstractAuthorizationProvider
Parameters:
username - The username.
principals - The Collection of principals authorized to use the named user.
Throws:
UnsupportedOperationException - If this AuthorizationProvider cannot be updated.

setAuthorized

public void setAuthorized(String username,
                          Collection<String> principals)
                   throws UnsupportedOperationException
Always throws UnsupportedOperationException.

Specified by:
setAuthorized in class AbstractAuthorizationProvider
Parameters:
username - The username.
principals - The Collection of principals authorized to use the named user.
Throws:
UnsupportedOperationException - If this AuthorizationProvider cannot be updated.

name

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

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

description

public String description()
Returns a description of the Policy

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

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.