Class KerberosUsernamePasswordAuthenticator
- java.lang.Object
- 
- org.keycloak.federation.kerberos.impl.KerberosUsernamePasswordAuthenticator
 
- 
 public class KerberosUsernamePasswordAuthenticator extends Object - Author:
- Marek Posolda
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected CommonKerberosConfigconfig
 - 
Constructor SummaryConstructors Constructor Description KerberosUsernamePasswordAuthenticator(CommonKerberosConfig config)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SubjectauthenticateSubject(String username, String password)Returns true if user was successfully authenticated against Kerberosprotected voidcheckKerberosServerAvailable(LoginException le)protected voidcheckKerberosUsername(LoginException le)protected CallbackHandlercreateJaasCallbackHandler(String principal, String password)protected ConfigurationcreateJaasConfiguration()protected StringgetKerberosPrincipal(String username)booleanisUserAvailable(String username)Returns true if user with given username exists in kerberos databasevoidlogoutSubject()booleanvalidUser(String username, String password)Returns true if user was successfully authenticated against Kerberos
 
- 
- 
- 
Field Detail- 
configprotected final CommonKerberosConfig config 
 
- 
 - 
Constructor Detail- 
KerberosUsernamePasswordAuthenticatorpublic KerberosUsernamePasswordAuthenticator(CommonKerberosConfig config) 
 
- 
 - 
Method Detail- 
isUserAvailablepublic 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
 
 - 
validUserpublic 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
 
 - 
checkKerberosServerAvailableprotected void checkKerberosServerAvailable(LoginException le) 
 - 
checkKerberosUsernameprotected void checkKerberosUsername(LoginException le) 
 - 
authenticateSubjectpublic 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
 
 - 
logoutSubjectpublic void logoutSubject() 
 - 
getKerberosPrincipalprotected String getKerberosPrincipal(String username) throws LoginException - Throws:
- LoginException
 
 - 
createJaasCallbackHandlerprotected CallbackHandler createJaasCallbackHandler(String principal, String password) 
 - 
createJaasConfigurationprotected Configuration createJaasConfiguration() 
 
- 
 
-