Class KerberosUsernamePasswordAuthenticator

java.lang.Object
org.keycloak.federation.kerberos.impl.KerberosUsernamePasswordAuthenticator

public class KerberosUsernamePasswordAuthenticator extends Object
Author:
Marek Posolda
  • Field Details

  • Constructor Details

    • KerberosUsernamePasswordAuthenticator

      public KerberosUsernamePasswordAuthenticator(CommonKerberosConfig config)
  • Method Details

    • isUserAvailable

      public boolean isUserAvailable(String username)
      Returns true if user with given username exists in kerberos database
      Parameters:
      username - username without Kerberos realm attached or with correct realm attached
      Returns:
      true if user available
    • validUser

      public boolean validUser(String username, String password)
      Returns true if user was successfully authenticated against Kerberos
      Parameters:
      username - username without Kerberos realm attached or with correct realm attached
      password - kerberos password
      Returns:
      true if user was successfully authenticated
    • checkKerberosServerAvailable

      protected void checkKerberosServerAvailable(LoginException le)
    • checkKerberosUsername

      protected void checkKerberosUsername(LoginException le)
    • authenticateSubject

      public Subject authenticateSubject(String username, String password) throws LoginException
      Returns true if user was successfully authenticated against Kerberos
      Parameters:
      username - username without Kerberos realm attached
      password - kerberos password
      Returns:
      true if user was successfully authenticated
      Throws:
      LoginException
    • logoutSubject

      public void logoutSubject()
    • getKerberosPrincipal

      public String getKerberosPrincipal(String username) throws LoginException
      Throws:
      LoginException
    • createJaasCallbackHandler

      protected CallbackHandler createJaasCallbackHandler(String principal, String password)
    • createJaasConfiguration

      protected Configuration createJaasConfiguration()