Package no.polaric.core.auth
Class PasswordFileAuthenticator
java.lang.Object
no.polaric.core.auth.PasswordFileAuthenticator
- All Implemented Interfaces:
org.pac4j.core.credentials.authenticator.Authenticator
public class PasswordFileAuthenticator
extends Object
implements org.pac4j.core.credentials.authenticator.Authenticator
Use a simple password file. For small numbers of user/password pairs.
For larger numbers of users, consider using a database instead.
-
Field Summary
Fields inherited from interface org.pac4j.core.credentials.authenticator.Authenticator
ALWAYS_VALIDATE, NEVER_VALIDATE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
load()
Load passwords (hashes) from file.protected void
throwsException
(String message) Optional<org.pac4j.core.credentials.Credentials>
validate
(org.pac4j.core.context.CallContext context, org.pac4j.core.credentials.Credentials cred)
-
Constructor Details
-
PasswordFileAuthenticator
-
-
Method Details
-
load
public void load()Load passwords (hashes) from file. -
validate
public Optional<org.pac4j.core.credentials.Credentials> validate(org.pac4j.core.context.CallContext context, org.pac4j.core.credentials.Credentials cred) throws org.pac4j.core.exception.CredentialsException - Specified by:
validate
in interfaceorg.pac4j.core.credentials.authenticator.Authenticator
- Throws:
org.pac4j.core.exception.CredentialsException
-
throwsException
- Throws:
org.pac4j.core.exception.CredentialsException
-