@Component(value="cuba_LoginPasswordLoginProvider") public class LoginPasswordLoginProvider extends java.lang.Object implements LoginProvider, org.springframework.core.Ordered
Modifier and Type | Field and Description |
---|---|
protected AuthenticationService |
authenticationService |
protected Messages |
messages |
protected static java.lang.String |
MSG_PACK |
protected PasswordEncryption |
passwordEncryption |
protected TrustedClientService |
trustedClientService |
protected UsersRepository |
usersRepository |
protected WebAuthConfig |
webAuthConfig |
HIGHEST_PLATFORM_PRECEDENCE, LOWEST_PLATFORM_PRECEDENCE
Constructor and Description |
---|
LoginPasswordLoginProvider() |
Modifier and Type | Method and Description |
---|---|
protected TrustedClientCredentials |
createTrustedCredentials(LoginPasswordCredentials credentials) |
protected java.lang.String |
getInvalidCredentialsMessage(java.lang.String login,
java.util.Locale locale) |
int |
getOrder() |
AuthenticationDetails |
login(Credentials credentials)
Authenticates a user and provides authentication details.
|
protected AuthenticationDetails |
loginClient(LoginPasswordCredentials credentials) |
protected AuthenticationDetails |
loginMiddleware(LoginPasswordCredentials credentials) |
boolean |
supports(java.lang.Class<?> credentialsClass)
Checks if this provider supports passed credentials class or not.
|
@Inject protected AuthenticationService authenticationService
@Inject protected Messages messages
@Inject protected UsersRepository usersRepository
@Inject protected PasswordEncryption passwordEncryption
@Inject protected TrustedClientService trustedClientService
@Inject protected WebAuthConfig webAuthConfig
protected static final java.lang.String MSG_PACK
@Nullable public AuthenticationDetails login(Credentials credentials) throws LoginException
LoginProvider
login
in interface LoginProvider
credentials
- credentialsLoginException
- if authentication failsprotected AuthenticationDetails loginMiddleware(LoginPasswordCredentials credentials) throws LoginException
LoginException
protected AuthenticationDetails loginClient(LoginPasswordCredentials credentials)
protected TrustedClientCredentials createTrustedCredentials(LoginPasswordCredentials credentials)
protected java.lang.String getInvalidCredentialsMessage(java.lang.String login, java.util.Locale locale)
public boolean supports(java.lang.Class<?> credentialsClass)
LoginProvider
supports
in interface LoginProvider
credentialsClass
- credentials classCredentials
object.public int getOrder()
getOrder
in interface org.springframework.core.Ordered