Class SimpleServerAuthenticationProvider

    • Constructor Detail

      • SimpleServerAuthenticationProvider

        public SimpleServerAuthenticationProvider()
    • Method Detail

      • getCallbackHandler

        public AuthorizingCallbackHandler getCallbackHandler​(String mechanismName,
                                                             Map<String,​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 interface ServerAuthenticationProvider
        mechanismName -
        mechanismProperties - the mechanism properties that might need to be adjusted to support the specific mechanism / callbackhandler combination
        the callback handler or null if the mechanism is not supported
      • addUser

        public void addUser​(String userName,
                            String userRealm,
                            char[] password,
                            String... groups)
        Add a user to the authentication table.
        userName - the user name
        userRealm - the user realm
        password - the password
        groups - the groups the user belongs to