Class SimpleServerAuthenticationProvider
- java.lang.Object
-
- org.infinispan.server.core.security.simple.SimpleServerAuthenticationProvider
-
- All Implemented Interfaces:
ServerAuthenticationProvider
public final class SimpleServerAuthenticationProvider extends java.lang.Object implements ServerAuthenticationProvider
A server authentication handler which maintains a simple map of user names and passwords.- Author:
- Darran Lofthouse, Tristan Tarrant
-
-
Constructor Summary
Constructors Constructor Description SimpleServerAuthenticationProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUser(java.lang.String userName, java.lang.String userRealm, char[] password, java.lang.String... groups)
Add a user to the authentication table.AuthorizingCallbackHandler
getCallbackHandler(java.lang.String mechanismName, java.util.Map<java.lang.String,java.lang.String> mechanismProperties)
Get a callback handler for the given mechanism name.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.server.core.security.ServerAuthenticationProvider
createSaslServer
-
-
-
-
Method Detail
-
getCallbackHandler
public AuthorizingCallbackHandler getCallbackHandler(java.lang.String mechanismName, java.util.Map<java.lang.String,java.lang.String> mechanismProperties)
Get a callback handler for the given mechanism name.This method is called each time a mechanism is selected for the connection and the resulting AuthorizingCallbackHandler will be cached and used multiple times for this connection, AuthorizingCallbackHandler should either be thread safe or the ServerAuthenticationProvider should provide a new instance each time called.
- Specified by:
getCallbackHandler
in interfaceServerAuthenticationProvider
- Parameters:
mechanismName
-mechanismProperties
- the mechanism properties that might need to be adjusted to support the specific mechanism / callbackhandler combination- Returns:
- the callback handler or
null
if the mechanism is not supported
-
addUser
public void addUser(java.lang.String userName, java.lang.String userRealm, char[] password, java.lang.String... groups)
Add a user to the authentication table.- Parameters:
userName
- the user nameuserRealm
- the user realmpassword
- the passwordgroups
- the groups the user belongs to
-
-