org.infoglue.cms.security
Class JNDIBasicAuthorizationModule

java.lang.Object
  extended by org.infoglue.cms.security.JNDIBasicAuthorizationModule
All Implemented Interfaces:
AuthorizationModule
Direct Known Subclasses:
OpenLDAPJNDIBasicAuthorizationModule

public class JNDIBasicAuthorizationModule
extends java.lang.Object
implements AuthorizationModule

Author:
Mattias Bogeblad This authentication module authenticates an user against the ordinary infoglue database.

Field Summary
protected  java.util.Properties extraProperties
           
 
Constructor Summary
JNDIBasicAuthorizationModule()
           
 
Method Summary
 java.util.List authorizeUser(java.lang.String userName)
          This method gets a users roles
 void createInfoGlueGroup(GroupVO groupVO)
          This method is used to create a new group.
 void createInfoGluePrincipal(SystemUserVO systemUserVO)
          This method is used to create a new user.
 void createInfoGlueRole(RoleVO roleVO)
          This method is used to create a new rol.
 void deleteInfoGlueGroup(java.lang.String groupName)
          This method is used to delete an existing group.
 void deleteInfoGluePrincipal(java.lang.String userName)
          This method is used to delete an existing user.
 void deleteInfoGlueRole(java.lang.String roleName)
          This method is used to delete an existing role.
 InfoGlueGroup getAuthorizedInfoGlueGroup(java.lang.String groupName)
          Gets an InfoGlueGroup
 InfoGluePrincipal getAuthorizedInfoGluePrincipal(java.lang.String userName)
          Gets an authorized InfoGluePrincipal
 InfoGlueRole getAuthorizedInfoGlueRole(java.lang.String roleName)
          Gets an authorized InfoGlueRole.
 java.util.Properties getExtraProperties()
           
 java.util.List getFilteredUsers(java.lang.String firstName, java.lang.String lastName, java.lang.String userName, java.lang.String email, java.lang.String[] roleIds)
          This method is used to get a filtered list of all users.
 java.util.List getGroups()
          This method returns a list of all groups available to InfoGlue.
protected  java.util.List getGroups(java.lang.String userName)
          Return a List of roles associated with the given User.
 java.util.List getGroupUsers(java.lang.String groupName)
          Gets a list of users which is memebers of the given group
 java.util.List getRoles()
          This method gets a list of roles
protected  java.util.List getRoles(java.lang.String userName)
          Return a List of roles associated with the given User.
 java.util.List getRoleUsers(java.lang.String roleName)
          This method is used to fetch all users part of the named role.
 boolean getSupportCreate()
          Gets is the implementing class can create as well as read
 boolean getSupportDelete()
          Gets is the implementing class can delete as well as read
 boolean getSupportUpdate()
          Gets is the implementing class can update as well as read
 java.lang.Object getTransactionObject()
           
protected  java.util.Map getUserAttributes(java.lang.String userName)
          Returns an attribute set which this user has.
 java.util.List getUsers()
          This method gets a list of users
 java.util.List getUsers(java.lang.String roleName)
          This method is used to fetch all users part of the named role.
 void setExtraProperties(java.util.Properties properties)
           
 void setTransactionObject(java.lang.Object transactionObject)
           
 void updateInfoGlueGroup(GroupVO roleVO, java.lang.String[] userNames)
          This method is used to update an existing group.
 void updateInfoGluePrincipal(SystemUserVO systemUserVO, java.lang.String[] roleNames)
           
 void updateInfoGluePrincipal(SystemUserVO systemUserVO, java.lang.String[] roleNames, java.lang.String[] groupNames)
          This method is used to update an existing user.
 void updateInfoGluePrincipalPassword(java.lang.String userName)
          This method is used to send out a newpassword to an existing users.
 void updateInfoGluePrincipalPassword(java.lang.String userName, java.lang.String oldPassword, java.lang.String newPassword)
          This method is used to send out a newpassword to an existing users.
 void updateInfoGlueRole(RoleVO roleVO, java.lang.String[] userNames)
          This method is used to update an existing role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extraProperties

protected java.util.Properties extraProperties
Constructor Detail

JNDIBasicAuthorizationModule

public JNDIBasicAuthorizationModule()
Method Detail

getSupportUpdate

public boolean getSupportUpdate()
Gets is the implementing class can update as well as read

Specified by:
getSupportUpdate in interface AuthorizationModule

getSupportDelete

public boolean getSupportDelete()
Gets is the implementing class can delete as well as read

Specified by:
getSupportDelete in interface AuthorizationModule

getSupportCreate

public boolean getSupportCreate()
Gets is the implementing class can create as well as read

Specified by:
getSupportCreate in interface AuthorizationModule

getAuthorizedInfoGluePrincipal

public InfoGluePrincipal getAuthorizedInfoGluePrincipal(java.lang.String userName)
                                                 throws java.lang.Exception
Gets an authorized InfoGluePrincipal

Specified by:
getAuthorizedInfoGluePrincipal in interface AuthorizationModule
Throws:
java.lang.Exception

getAuthorizedInfoGlueRole

public InfoGlueRole getAuthorizedInfoGlueRole(java.lang.String roleName)
                                       throws java.lang.Exception
Gets an authorized InfoGlueRole.

Specified by:
getAuthorizedInfoGlueRole in interface AuthorizationModule
Throws:
java.lang.Exception

authorizeUser

public java.util.List authorizeUser(java.lang.String userName)
                             throws java.lang.Exception
This method gets a users roles

Specified by:
authorizeUser in interface AuthorizationModule
Throws:
java.lang.Exception

getUserAttributes

protected java.util.Map getUserAttributes(java.lang.String userName)
                                   throws javax.naming.NamingException,
                                          java.lang.Exception
Returns an attribute set which this user has.

Parameters:
context - The directory context we are searching
user - The User to be checked
Throws:
javax.naming.NamingException - if a directory server error occurs
java.lang.Exception

getRoles

protected java.util.List getRoles(java.lang.String userName)
                           throws javax.naming.NamingException,
                                  java.lang.Exception
Return a List of roles associated with the given User. Any roles present in the user's directory entry are supplemented by a directory search. If no roles are associated with this user, a zero-length List is returned.

Parameters:
context - The directory context we are searching
user - The User to be checked
Throws:
javax.naming.NamingException - if a directory server error occurs
java.lang.Exception

getGroups

protected java.util.List getGroups(java.lang.String userName)
                            throws javax.naming.NamingException,
                                   java.lang.Exception
Return a List of roles associated with the given User. Any roles present in the user's directory entry are supplemented by a directory search. If no roles are associated with this user, a zero-length List is returned.

Parameters:
context - The directory context we are searching
user - The User to be checked
Throws:
javax.naming.NamingException - if a directory server error occurs
java.lang.Exception

getRoles

public java.util.List getRoles()
                        throws java.lang.Exception
This method gets a list of roles

Specified by:
getRoles in interface AuthorizationModule
Throws:
java.lang.Exception

getUsers

public java.util.List getUsers()
                        throws java.lang.Exception
This method gets a list of users

Specified by:
getUsers in interface AuthorizationModule
Throws:
java.lang.Exception

getFilteredUsers

public java.util.List getFilteredUsers(java.lang.String firstName,
                                       java.lang.String lastName,
                                       java.lang.String userName,
                                       java.lang.String email,
                                       java.lang.String[] roleIds)
                                throws SystemException,
                                       Bug
Description copied from interface: AuthorizationModule
This method is used to get a filtered list of all users.

Specified by:
getFilteredUsers in interface AuthorizationModule
Returns:
Throws:
SystemException
Bug

getUsers

public java.util.List getUsers(java.lang.String roleName)
                        throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to fetch all users part of the named role.

Specified by:
getUsers in interface AuthorizationModule
Throws:
java.lang.Exception

createInfoGluePrincipal

public void createInfoGluePrincipal(SystemUserVO systemUserVO)
                             throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to create a new user.

Specified by:
createInfoGluePrincipal in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGluePrincipal

public void updateInfoGluePrincipal(SystemUserVO systemUserVO,
                                    java.lang.String[] roleNames)
                             throws java.lang.Exception
Throws:
java.lang.Exception

updateInfoGluePrincipalPassword

public void updateInfoGluePrincipalPassword(java.lang.String userName)
                                     throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to send out a newpassword to an existing users.

Specified by:
updateInfoGluePrincipalPassword in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGluePrincipalPassword

public void updateInfoGluePrincipalPassword(java.lang.String userName,
                                            java.lang.String oldPassword,
                                            java.lang.String newPassword)
                                     throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to send out a newpassword to an existing users.

Specified by:
updateInfoGluePrincipalPassword in interface AuthorizationModule
Throws:
java.lang.Exception

deleteInfoGluePrincipal

public void deleteInfoGluePrincipal(java.lang.String userName)
                             throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to delete an existing user.

Specified by:
deleteInfoGluePrincipal in interface AuthorizationModule
Throws:
java.lang.Exception

createInfoGlueRole

public void createInfoGlueRole(RoleVO roleVO)
                        throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to create a new rol.

Specified by:
createInfoGlueRole in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGlueRole

public void updateInfoGlueRole(RoleVO roleVO,
                               java.lang.String[] userNames)
                        throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to update an existing role.

Specified by:
updateInfoGlueRole in interface AuthorizationModule
Throws:
java.lang.Exception

deleteInfoGlueRole

public void deleteInfoGlueRole(java.lang.String roleName)
                        throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to delete an existing role.

Specified by:
deleteInfoGlueRole in interface AuthorizationModule
Throws:
java.lang.Exception

getExtraProperties

public java.util.Properties getExtraProperties()
Specified by:
getExtraProperties in interface AuthorizationModule

setExtraProperties

public void setExtraProperties(java.util.Properties properties)
Specified by:
setExtraProperties in interface AuthorizationModule

setTransactionObject

public void setTransactionObject(java.lang.Object transactionObject)
Specified by:
setTransactionObject in interface AuthorizationModule

getTransactionObject

public java.lang.Object getTransactionObject()
Specified by:
getTransactionObject in interface AuthorizationModule

getAuthorizedInfoGlueGroup

public InfoGlueGroup getAuthorizedInfoGlueGroup(java.lang.String groupName)
                                         throws java.lang.Exception
Description copied from interface: AuthorizationModule
Gets an InfoGlueGroup

Specified by:
getAuthorizedInfoGlueGroup in interface AuthorizationModule
Throws:
java.lang.Exception

getGroups

public java.util.List getGroups()
                         throws java.lang.Exception
This method returns a list of all groups available to InfoGlue.

Specified by:
getGroups in interface AuthorizationModule
Throws:
java.lang.Exception

getRoleUsers

public java.util.List getRoleUsers(java.lang.String roleName)
                            throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to fetch all users part of the named role.

Specified by:
getRoleUsers in interface AuthorizationModule
Throws:
java.lang.Exception

getGroupUsers

public java.util.List getGroupUsers(java.lang.String groupName)
                             throws java.lang.Exception
Gets a list of users which is memebers of the given group

Specified by:
getGroupUsers in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGluePrincipal

public void updateInfoGluePrincipal(SystemUserVO systemUserVO,
                                    java.lang.String[] roleNames,
                                    java.lang.String[] groupNames)
                             throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to update an existing user.

Specified by:
updateInfoGluePrincipal in interface AuthorizationModule
Throws:
java.lang.Exception

createInfoGlueGroup

public void createInfoGlueGroup(GroupVO groupVO)
                         throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to create a new group.

Specified by:
createInfoGlueGroup in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGlueGroup

public void updateInfoGlueGroup(GroupVO roleVO,
                                java.lang.String[] userNames)
                         throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to update an existing group.

Specified by:
updateInfoGlueGroup in interface AuthorizationModule
Throws:
java.lang.Exception

deleteInfoGlueGroup

public void deleteInfoGlueGroup(java.lang.String groupName)
                         throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to delete an existing group.

Specified by:
deleteInfoGlueGroup in interface AuthorizationModule
Throws:
java.lang.Exception


Copyright © 2005 InfoGlue.org All Rights Reserved.