Class ApiKeyUsernamePasswordAuthenticator
java.lang.Object
ch.tocco.nice2.userbase.impl.auth.ApiKeyUsernamePasswordAuthenticator
- All Implemented Interfaces:
UsernamePasswordAuthenticator
@Component
public class ApiKeyUsernamePasswordAuthenticator
extends Object
implements UsernamePasswordAuthenticator
-
Field Summary
-
Constructor Summary
ConstructorDescriptionApiKeyUsernamePasswordAuthenticator
(org.slf4j.Logger logger, ApiKeyManager apiKeyManager, SessionManager sessionManager) -
Method Summary
Modifier and TypeMethodDescriptionint
priority()
Higher priority will be executed first.boolean
validateCredentialsForPrincipal
(UsernamePasswordCredentials credentials, PrincipalDetails principalDetails, Challenge challenge)
-
Field Details
-
API_KEY_SESSION_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
ApiKeyUsernamePasswordAuthenticator
public ApiKeyUsernamePasswordAuthenticator(org.slf4j.Logger logger, ApiKeyManager apiKeyManager, SessionManager sessionManager)
-
-
Method Details
-
priority
public int priority()Description copied from interface:UsernamePasswordAuthenticator
Higher priority will be executed first.- Specified by:
priority
in interfaceUsernamePasswordAuthenticator
-
validateCredentialsForPrincipal
public boolean validateCredentialsForPrincipal(UsernamePasswordCredentials credentials, PrincipalDetails principalDetails, Challenge challenge) - Specified by:
validateCredentialsForPrincipal
in interfaceUsernamePasswordAuthenticator
- Returns:
- true if the username/password combination is valid → the following authenticators won't be executed anymore
-