Class AuthDetails
java.lang.Object
io.jmix.securityflowui.authentication.AuthDetails
Class contains authentication information.
Example usage:
@Autowired private LoginScreenAuthenticator authenticator; private void doLogin(String username, String password) { Authentication authentication = authenticationSupport.authenticate( AuthDetails.of(username, password) .withLocale(localesField.getValue()) .withRememberMe(rememberMeCheckBox.isChecked()), this); }
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static AuthDetails
Creates a new instance with authentication credentials.withLocale
(Locale locale) Sets user locale to be used in application.withRememberMe
(boolean rememberMe) Sets rememberMe enabled.withTimeZone
(TimeZone timeZone) Sets user timezone to be used in application.
-
Field Details
-
username
-
password
-
locale
-
timeZone
-
rememberMe
protected boolean rememberMe
-
-
Method Details
-
of
Creates a new instance with authentication credentials.- Parameters:
username
- user loginpassword
- user password- Returns:
- new instance
-
getUsername
- Returns:
- user login
-
getPassword
- Returns:
- user password
-
isRememberMe
public boolean isRememberMe()- Returns:
true
if rememberMe is enabled,false
otherwise
-
withRememberMe
Sets rememberMe enabled. If rememberMe is enabled, the user can pass authentication without entering credentials.- Parameters:
rememberMe
- whether rememberMe should be used- Returns:
- current instance
-
getLocale
- Returns:
- a locale or
null
if not set
-
withLocale
Sets user locale to be used in application.- Parameters:
locale
- a locale- Returns:
- current instance
-
getTimeZone
- Returns:
- a timezone or
null
if not set
-
withTimeZone
Sets user timezone to be used in application.- Parameters:
timeZone
- a timezone- Returns:
- current instance
-