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()
AuthenticationSessiongetDistinguishedName in interface AuthenticationSessionpublic java.util.Set getGroups()
AuthenticationSessiongetGroups in interface AuthenticationSessionpublic java.lang.String getMailAddress()
AuthenticationSessiongetMailAddress in interface AuthenticationSessionpublic java.util.Set getNames()
AuthenticationSessiongetNames in interface AuthenticationSessionpublic java.lang.String getSessionToken()
AuthenticationSessiongetSessionToken in interface AuthenticationSessionpublic boolean isValid()
AuthenticationSessionisValid in interface AuthenticationSessionpublic void logout()
AuthenticationSessionlogout in interface AuthenticationSessionpublic void setValid(boolean valid)
public void setMailAddress(java.lang.String mailAddress)
public void setSessionToken(java.lang.String sessionToken)