Interface AuthenticationService<T,U>
- Type Parameters:
T- the credentials type (e.g. a username/password record)U- the subject (user) type
public interface AuthenticationService<T,U>
SPI contract for credential validation and subject loading.
Implementations must be registered in
META-INF/services/com.svenruppert.jsentinel.authentication.AuthenticationService.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckCredentials(T credentials) Validates the given credentials.loadSubject(T credentials) Loads the subject for the given (already validated) credentials.Returns the class token for the subject type.
-
Method Details
-
checkCredentials
Validates the given credentials.- Parameters:
credentials- the credentials to check- Returns:
trueif the credentials are valid
-
loadSubject
-
subjectType
Returns the class token for the subject type. Used bySubjectStoreimplementations to store and retrieve the subject.- Returns:
- the subject class
-