Package com.kheops.jmap.server.security
Class AbstractSsoUserManager
java.lang.Object
com.kheops.jmap.server.security.AbstractSsoUserManager
- All Implemented Interfaces:
ExternalAuthenticationService,UserManager,Serializable
- Direct Known Subclasses:
OidcUserManager,Saml2UserManager
public abstract class AbstractSsoUserManager
extends Object
implements UserManager, ExternalAuthenticationService
- See Also:
-
Field Summary
FieldsFields inherited from interface com.kheops.jmap.server.security.UserManager
USERMANAGER_CONF_HOME, USERMANAGER_PROPS_FILENAME, USERMANAGER_PROPS_NAME, USERNAME_ADMINISTRATOR, USERNAME_ANONYMOUS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSsoUserManager(String databaseDriver, String databaseUrl, String databaseUser, String databasePassword) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a group to the user manager.voidaddListener(UserManagerListener userManagerListener) Adds a listener for user or group changes.booleanaddMemberToGroup(Group group, User user) Adds a user to a group.booleanAdds a user to the user manager.authenticate(String username, String password) Authenticates a user with the specified username and password.booleandeleteGroup(String name) Deletes a group from the user manager.booleandeleteUser(String username) Deletes a user from the user manager.voiddestroy()Closes this UserManager and resets all registered ACL's.protected voidfireGroupChangedEvent(Group group) Returns an ExternalAuthenticatorInfo that will be used on the client side to create a new instance of the ExternalAuthenticator to use.Returns the friendly name for this user manager.Returns the group that corresponds to the specified group name.Returns the user that corresponds to the specified username.Group[]groups()Returns all groups managed by the user manager.booleaninit()This method will be used by the implementor to do the necessary initializationbooleanReturns whether this user manager is read only.booleanload(Properties properties) voidremoveListener(UserManagerListener userManagerListener) Removes a listener for user or group changes.booleanremoveMemberFromGroup(Group group, User user) Removes a user from a group.save()voidsetFriendlyName(String friendlyName) Sets a friendly name for this user manager.booleanReturns whether this user manager supports groups.booleanupdateUser(User user) Sets new information for a user.protected voidupdateUserToken(String username, String token) User[]users()Returns all users managed by the user manager.voidvalidate()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kheops.jmap.server.security.ExternalAuthenticationService
validateAuthenticationTokenMethods inherited from interface com.kheops.jmap.server.security.UserManager
getName, getVersion, search, supportsChangePassword
-
Field Details
-
GROUP_ADMINISTRATORS
- See Also:
-
cipher
-
-
Constructor Details
-
AbstractSsoUserManager
-
-
Method Details
-
init
public boolean init()Description copied from interface:UserManagerThis method will be used by the implementor to do the necessary initialization- Specified by:
initin interfaceUserManager
-
addUser
Description copied from interface:UserManagerAdds a user to the user manager.- Specified by:
addUserin interfaceUserManager- Parameters:
user- the corresponding user to be added.- Returns:
- true if the user was added successfully.
- Throws:
SecurityException
-
addGroup
Description copied from interface:UserManagerAdds a group to the user manager.- Specified by:
addGroupin interfaceUserManager- Parameters:
group- the corresponding group to be added.- Returns:
- true if the group was added successfully.
- Throws:
SecurityException
-
deleteUser
Description copied from interface:UserManagerDeletes a user from the user manager.- Specified by:
deleteUserin interfaceUserManager- Parameters:
username- the corresponding user to be deleted- Returns:
- true if the user was deleted successfully.
- Throws:
SecurityException
-
deleteGroup
Description copied from interface:UserManagerDeletes a group from the user manager.- Specified by:
deleteGroupin interfaceUserManager- Parameters:
name- the corresponding group to be added.- Returns:
- true if the group was deleted successfully.
- Throws:
SecurityException
-
updateUser
Description copied from interface:UserManagerSets new information for a user.- Specified by:
updateUserin interfaceUserManager- Parameters:
user- the new information to set.- Throws:
SecurityException
-
updateUserToken
-
getUser
Description copied from interface:UserManagerReturns the user that corresponds to the specified username.- Specified by:
getUserin interfaceUserManager- Parameters:
username- the username to search.- Returns:
- the corresponding User instance.
- Throws:
SecurityException
-
getGroup
Description copied from interface:UserManagerReturns the group that corresponds to the specified group name.- Specified by:
getGroupin interfaceUserManager- Parameters:
name- the name to search.- Returns:
- the corresponding Group instance.
- Throws:
SecurityException
-
users
Description copied from interface:UserManagerReturns all users managed by the user manager.- Specified by:
usersin interfaceUserManager- Returns:
- an User array containing all the users.
- Throws:
SecurityException
-
groups
Description copied from interface:UserManagerReturns all groups managed by the user manager.- Specified by:
groupsin interfaceUserManager- Returns:
- an Group array containing all the groups
- Throws:
SecurityException
-
authenticate
Description copied from interface:UserManagerAuthenticates a user with the specified username and password.- Specified by:
authenticatein interfaceUserManager- Parameters:
username- the username to use.password- the password to use.- Returns:
- if the authentication was successful, the user that corresponds to the specified username is returned. Otherwise, null is returned.
- Throws:
SecurityException
-
addMemberToGroup
Description copied from interface:UserManagerAdds a user to a group.- Specified by:
addMemberToGroupin interfaceUserManager- Parameters:
group- the corresponding group where the user should be added.user- to be added to the group.- Throws:
SecurityException
-
removeMemberFromGroup
Description copied from interface:UserManagerRemoves a user from a group.- Specified by:
removeMemberFromGroupin interfaceUserManager- Parameters:
group- the corresponding group where the user should be removed.user- to be removed to the group.- Throws:
SecurityException
-
load
- Specified by:
loadin interfaceUserManager- Throws:
SecurityException
-
save
- Specified by:
savein interfaceUserManager
-
isReadOnly
public boolean isReadOnly()Description copied from interface:UserManagerReturns whether this user manager is read only.- Specified by:
isReadOnlyin interfaceUserManager- Returns:
- true if read only, false otherwise
-
supportsGroups
public boolean supportsGroups()Description copied from interface:UserManagerReturns whether this user manager supports groups.- Specified by:
supportsGroupsin interfaceUserManager- Returns:
- true if groups are supported, false otherwise
-
setFriendlyName
Description copied from interface:UserManagerSets a friendly name for this user manager.- Specified by:
setFriendlyNamein interfaceUserManager- Parameters:
friendlyName- a friendly name
-
getFriendlyName
Description copied from interface:UserManagerReturns the friendly name for this user manager. If none sets, it returns the name of this user manager.- Specified by:
getFriendlyNamein interfaceUserManager- Returns:
- friendly name
-
fireGroupChangedEvent
- Throws:
SecurityException
-
addListener
Description copied from interface:UserManagerAdds a listener for user or group changes.- Specified by:
addListenerin interfaceUserManager- Parameters:
userManagerListener- the listener object
-
removeListener
Description copied from interface:UserManagerRemoves a listener for user or group changes.- Specified by:
removeListenerin interfaceUserManager- Parameters:
userManagerListener- the listener object
-
getExternalAuthenticator
Description copied from interface:ExternalAuthenticationServiceReturns an ExternalAuthenticatorInfo that will be used on the client side to create a new instance of the ExternalAuthenticator to use.- Specified by:
getExternalAuthenticatorin interfaceExternalAuthenticationService- Returns:
- the ExternalAuthenticatorInfo instance to use on the client side.
-
validate
- Specified by:
validatein interfaceUserManager- Throws:
SecurityException
-
destroy
public void destroy()Description copied from interface:UserManagerCloses this UserManager and resets all registered ACL's.- Specified by:
destroyin interfaceUserManager
-