Package de.dlr.proseo.ui.gui
Klasse GUIAuthenticationToken
java.lang.Object
de.dlr.proseo.ui.gui.GUIAuthenticationToken
- Alle implementierten Schnittstellen:
Serializable
,Principal
,org.springframework.security.core.Authentication
public class GUIAuthenticationToken
extends Object
implements org.springframework.security.core.Authentication
Represents a token for an authentication within a Graphical User Interface. It holds the credentials, principal details and other
related data like roles, mission, etc. This class is used for authenticating a user within a GUI-based application.
- Autor:
- David Mazo
- Siehe auch:
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungCollection
<? extends org.springframework.security.core.GrantedAuthority> Returns the granted authorities, which are roles or permissions for the user.Returns the credentials, usually the password.Returns the data cache.Returns additional details, in this case, the mission.Return the mission of the usergetName()
Returns the username of the principal.Return the password of the principalReturns the principal, which represents the user's details.Returns the combined prosEO user name, which is a concatenation of mission name and username.Returns the list of user roles.boolean
Returns whether the user is authenticated.boolean
Returns whether it's a new login or not.void
setAuthenticated
(boolean isAuthenticated) Sets the authenticated flag.void
setCredentials
(Object credentials) Sets the credentials.void
setDataCache
(DataCache dataCache) Sets the data cache.void
setDetails
(String mission) Sets the mission details.void
setNewLogin
(boolean isNewLogin) Sets the new login flag.void
setPrincipal
(org.springframework.security.core.userdetails.UserDetails principal) Sets the principal, which represents the user's details.void
setUserRoles
(List<String> userRoles) Sets the list of user roles.
-
Konstruktordetails
-
GUIAuthenticationToken
public GUIAuthenticationToken()
-
-
Methodendetails
-
getDataCache
Returns the data cache.- Gibt zurück:
- the dataCache
-
setDataCache
Sets the data cache.- Parameter:
dataCache
- the dataCache to set
-
getUserRoles
Returns the list of user roles.- Gibt zurück:
- the userRoles
-
setUserRoles
Sets the list of user roles.- Parameter:
userRoles
- the userRoles to set
-
isNewLogin
public boolean isNewLogin()Returns whether it's a new login or not.- Gibt zurück:
- the isNewLogin
-
setNewLogin
public void setNewLogin(boolean isNewLogin) Sets the new login flag.- Parameter:
isNewLogin
- true if the login is new
-
getName
Returns the username of the principal. -
getPassword
Return the password of the principal- Gibt zurück:
- The password of the principal
-
getProseoName
Returns the combined prosEO user name, which is a concatenation of mission name and username.- Gibt zurück:
- The prosEO user name
-
getAuthorities
Returns the granted authorities, which are roles or permissions for the user.- Angegeben von:
getAuthorities
in Schnittstelleorg.springframework.security.core.Authentication
-
getCredentials
Returns the credentials, usually the password.- Angegeben von:
getCredentials
in Schnittstelleorg.springframework.security.core.Authentication
-
setCredentials
Sets the credentials.- Parameter:
credentials
- the user credentials
-
getDetails
Returns additional details, in this case, the mission.- Angegeben von:
getDetails
in Schnittstelleorg.springframework.security.core.Authentication
-
setDetails
Sets the mission details.- Parameter:
mission
- the mission to which the user is logged in
-
getMission
Return the mission of the user- Gibt zurück:
- The mission to which the user is logged in
-
getPrincipal
Returns the principal, which represents the user's details.- Angegeben von:
getPrincipal
in Schnittstelleorg.springframework.security.core.Authentication
-
setPrincipal
public void setPrincipal(org.springframework.security.core.userdetails.UserDetails principal) Sets the principal, which represents the user's details.- Parameter:
principal
- the user details
-
isAuthenticated
public boolean isAuthenticated()Returns whether the user is authenticated.- Angegeben von:
isAuthenticated
in Schnittstelleorg.springframework.security.core.Authentication
-
setAuthenticated
Sets the authenticated flag.- Angegeben von:
setAuthenticated
in Schnittstelleorg.springframework.security.core.Authentication
- Parameter:
isAuthenticated
- true if the user is authenticated- Löst aus:
IllegalArgumentException
-