public class BackendAuthSession extends java.lang.Object implements AuthenticationSession
WGDatabaseCore.openSession(AuthenticationSession, Object, boolean)
when
the database has no authentication module configured.
The WGAPI implementation may add authentication data like groups, mail address etc. to this
object's data.Constructor and Description |
---|
BackendAuthSession(java.lang.String username,
java.lang.Object credentials) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDistinguishedName()
Returns the distinguished, fully qualified, unique name of the user
|
java.util.Set |
getGroups()
Returns the user groups that the user is member of
|
java.lang.String |
getMailAddress()
Returns the e-mail address of the user if known
|
java.util.Set |
getNames()
Returns all known name variants/aliases of the user
|
java.lang.String |
getSessionToken()
May return a session token as Single sign-on information
|
boolean |
isValid()
Returns if this session object is still valid
|
void |
logout()
Closes the authentication session making this object invalid
|
void |
setMailAddress(java.lang.String mailAddress)
Set the mail address of the session user
|
void |
setSessionToken(java.lang.String sessionToken)
Set a session token of the session
|
void |
setValid(boolean valid)
Set if this session is valid
|
public BackendAuthSession(java.lang.String username, java.lang.Object credentials)
public java.lang.String getDistinguishedName()
AuthenticationSession
getDistinguishedName
in interface AuthenticationSession
public java.util.Set getGroups()
AuthenticationSession
getGroups
in interface AuthenticationSession
public java.lang.String getMailAddress()
AuthenticationSession
getMailAddress
in interface AuthenticationSession
public java.util.Set getNames()
AuthenticationSession
getNames
in interface AuthenticationSession
public java.lang.String getSessionToken()
AuthenticationSession
getSessionToken
in interface AuthenticationSession
public boolean isValid()
AuthenticationSession
isValid
in interface AuthenticationSession
public void logout()
AuthenticationSession
logout
in interface AuthenticationSession
public void setValid(boolean valid)
public void setMailAddress(java.lang.String mailAddress)
public void setSessionToken(java.lang.String sessionToken)