Package io.asgardeo.java.oidc.sdk.bean
Class SessionContext
- java.lang.Object
-
- io.asgardeo.java.oidc.sdk.bean.SessionContext
-
- All Implemented Interfaces:
Serializable
public class SessionContext extends Object implements Serializable
A data model class to define the Session Context element. The Session Context object should be used to hold the attributes of the logged in user session. These include the attributes:- The Authenticated User
- Access Token
- Refresh Token
- ID Token
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SessionContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAccessToken()Returns the access token.Map<String,Object>getAdditionalParams()Returns the additional query params.StringgetIdToken()Returns the id token.StringgetRefreshToken()Returns the refresh token.UsergetUser()Returns the authenticated user.voidsetAccessToken(String accessToken)Sets the access token.voidsetIdToken(String idToken)Sets the id token.voidsetRefreshToken(String refreshToken)Sets the refresh token.voidsetUser(User user)Sets the user of the authentication.
-
-
-
Method Detail
-
getUser
public User getUser()
Returns the authenticated user.- Returns:
Userobject for the authenticated user.
-
setUser
public void setUser(User user)
Sets the user of the authentication.- Parameters:
user- The user for the authentication.
-
getAccessToken
public String getAccessToken()
Returns the access token.- Returns:
- The access token string.
-
setAccessToken
public void setAccessToken(String accessToken)
Sets the access token.- Parameters:
accessToken- The access token.
-
getRefreshToken
public String getRefreshToken()
Returns the refresh token.- Returns:
- The refresh token string.
-
setRefreshToken
public void setRefreshToken(String refreshToken)
Sets the refresh token.- Parameters:
refreshToken- The refresh token.
-
getIdToken
public String getIdToken()
Returns the id token.- Returns:
- The Id token string.
-
setIdToken
public void setIdToken(String idToken)
Sets the id token.- Parameters:
idToken- The id token.
-
-