Class AuthDetails
java.lang.Object
io.jmix.securityflowui.authentication.AuthDetails
Class contains authentication information.
Example usage:
@Autowired
private LoginViewSupport authenticator;
private void doLogin(String username, String password) {
loginViewSupport.authenticate(
AuthDetails.of(event.getUsername(), event.getPassword())
);
}
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic AuthDetailsCreates 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:
trueif rememberMe is enabled,falseotherwise
-
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
nullif not set
-
withLocale
Sets user locale to be used in application.- Parameters:
locale- a locale- Returns:
- current instance
-
getTimeZone
- Returns:
- a timezone or
nullif not set
-
withTimeZone
Sets user timezone to be used in application.- Parameters:
timeZone- a timezone- Returns:
- current instance
-