public class AuthenticationResult
extends java.lang.Object
AuthenticationRule
Modifier and Type | Class and Description |
---|---|
static class |
AuthenticationResult.Builder
A builder for
AuthenticationResult |
Modifier and Type | Field and Description |
---|---|
static long |
UNSET |
Modifier | Constructor and Description |
---|---|
protected |
AuthenticationResult() |
Modifier and Type | Method and Description |
---|---|
static AuthenticationResult.Builder |
builder()
Constructs a new builder instance for an authentication result with default settings.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAttribute(java.lang.String attribute) |
NuclosLocale |
getDataLanguage() |
long |
getId()
Only a internal id for equals and hashCode.
|
long |
getLifetime()
The default lifetime is
AuthenticationResult.UNSET , which means that the system is handling
the session lifetime only and a refresh is never called. |
java.util.concurrent.TimeUnit |
getLifetimeUnit() |
NuclosLocale |
getLocale() |
UID |
getMandatorId() |
java.net.URI |
getServerUri()
Clients can reach the application server via this base URI.
|
UID |
getUserId()
Either username or user id must be specified.
|
java.lang.String |
getUsername()
Either username or user id must be specified.
|
int |
hashCode() |
boolean |
isLoginRequired() |
void |
setAttribute(java.lang.String attribute,
java.lang.String value)
Store important information during authentication, and access them later during refresh.
|
void |
setLifetime(long lifetime,
java.util.concurrent.TimeUnit unit)
The default lifetime is
AuthenticationResult.UNSET , which means that the system is handling
the session lifetime only and a refresh is never called. |
java.lang.String |
toString() |
public static final long UNSET
public long getId()
public java.lang.String getUsername()
public UID getUserId()
public UID getMandatorId()
public NuclosLocale getLocale()
public NuclosLocale getDataLanguage()
public java.net.URI getServerUri()
null
), the default settings are used.
Maybe a reverse proxy exists between server and client and requires an adjustment.
This is used to create referencing links between data.public boolean isLoginRequired()
true
if Nuclos should login the user.
false
drops the session after response.
(Determined during authentication)public long getLifetime()
AuthenticationResult.UNSET
, which means that the system is handling
the session lifetime only and a refresh is never called.AuthenticationRule.refreshAuthentication(RefreshAuthenticationContext)
public java.util.concurrent.TimeUnit getLifetimeUnit()
public void setLifetime(long lifetime, java.util.concurrent.TimeUnit unit)
AuthenticationResult.UNSET
, which means that the system is handling
the session lifetime only and a refresh is never called.lifetime
- unit
- the unit that lifetime is expressed inAuthenticationRule.refreshAuthentication(RefreshAuthenticationContext)
public void setAttribute(java.lang.String attribute, java.lang.String value)
attribute
- value
- public java.lang.String getAttribute(java.lang.String attribute)
attribute
- public static AuthenticationResult.Builder builder()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2024. All rights reserved.