@SessionScoped public class OpenIdContextImpl extends Object implements OpenIdContext
| Constructor and Description |
|---|
OpenIdContextImpl() |
| Modifier and Type | Method and Description |
|---|---|
AccessToken |
getAccessToken()
Gets the authorization token that was received from the OpenId Connect
provider
|
Set<String> |
getCallerGroups()
Gets the groups associated with the caller
|
String |
getCallerName()
Gets the caller name of the validated caller
|
OpenIdClaims |
getClaims()
Gets the User Claims that was received from the userinfo endpoint
|
javax.json.JsonObject |
getClaimsJson()
Gets the User Claims that was received from the userinfo endpoint
|
Optional<Long> |
getExpiresIn()
Return the time that the access token is granted for, if it is set to
expire
|
IdentityToken |
getIdentityToken()
Gets the identity token that was received from the OpenId Connect
provider
|
javax.json.JsonObject |
getProviderMetadata()
The OpenId Connect Provider's metadata document fetched via provider URI.
|
Optional<RefreshToken> |
getRefreshToken()
Returns the refresh token that can be used to get a new access token
|
String |
getSubject()
Subject Identifier.
|
String |
getTokenType()
Gets the token type value.
|
void |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Invalidates the RP's active OpenId Connect session and if
LogoutDefinition.notifyProvider()
set to true then redirect the End-User's User Agent to the
end_session_endpoint to notify the OP that the user has logged
out of the RP's application and ask the user whether they want to logout
from the OP as well. |
void |
setAccessToken(AccessToken token) |
void |
setCallerGroups(Set<String> callerGroups) |
void |
setCallerName(String callerName) |
void |
setClaims(javax.json.JsonObject claims) |
void |
setExpiresIn(Long expiresIn) |
void |
setIdentityToken(IdentityToken identityToken) |
void |
setOpenIdConfiguration(OpenIdConfiguration configuration) |
void |
setRefreshToken(RefreshToken refreshToken) |
void |
setTokenType(String tokenType) |
public String getCallerName()
OpenIdContextgetCallerName in interface OpenIdContextpublic void setCallerName(String callerName)
public Set<String> getCallerGroups()
OpenIdContextgetCallerGroups in interface OpenIdContextpublic String getSubject()
OpenIdContextgetSubject in interface OpenIdContextpublic String getTokenType()
OpenIdContextgetTokenType in interface OpenIdContextpublic void setTokenType(String tokenType)
public AccessToken getAccessToken()
OpenIdContextgetAccessToken in interface OpenIdContextpublic void setAccessToken(AccessToken token)
public IdentityToken getIdentityToken()
OpenIdContextgetIdentityToken in interface OpenIdContextpublic void setIdentityToken(IdentityToken identityToken)
public Optional<RefreshToken> getRefreshToken()
OpenIdContextgetRefreshToken in interface OpenIdContextpublic void setRefreshToken(RefreshToken refreshToken)
public Optional<Long> getExpiresIn()
OpenIdContextgetExpiresIn in interface OpenIdContextpublic void setExpiresIn(Long expiresIn)
public javax.json.JsonObject getClaimsJson()
OpenIdContextgetClaimsJson in interface OpenIdContextpublic OpenIdClaims getClaims()
OpenIdContextgetClaims in interface OpenIdContextOpenIdClaims instancepublic void setClaims(javax.json.JsonObject claims)
public javax.json.JsonObject getProviderMetadata()
OpenIdContextgetProviderMetadata in interface OpenIdContextpublic void setOpenIdConfiguration(OpenIdConfiguration configuration)
public void logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
OpenIdContextLogoutDefinition.notifyProvider()
set to true then redirect the End-User's User Agent to the
end_session_endpoint to notify the OP that the user has logged
out of the RP's application and ask the user whether they want to logout
from the OP as well. After successful logout, the End-User's User Agent
redirect back to the RP's post_redirect_uri
configured via
LogoutDefinition.redirectURI()logout in interface OpenIdContextCopyright © 2021. All rights reserved.