Package org.keycloak.adapters
Class RefreshableKeycloakSecurityContext
java.lang.Object
org.keycloak.KeycloakSecurityContext
org.keycloak.adapters.RefreshableKeycloakSecurityContext
- All Implemented Interfaces:
Serializable
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected KeycloakDeploymentprotected static org.jboss.logging.Loggerprotected Stringprotected AdapterTokenStoreFields inherited from class org.keycloak.KeycloakSecurityContext
authorizationContext, idToken, idTokenString, token, tokenString -
Constructor Summary
ConstructorsConstructorDescriptionRefreshableKeycloakSecurityContext(KeycloakDeployment deployment, AdapterTokenStore tokenStore, String tokenString, AccessToken token, String idTokenString, IDToken idToken, String refreshToken) -
Method Summary
Modifier and TypeMethodDescriptiongetToken()booleanisActive()booleanvoidlogout(KeycloakDeployment deployment) booleanrefreshExpiredToken(boolean checkActive) voidsetAuthorizationContext(AuthorizationContext authorizationContext) voidsetCurrentRequestInfo(KeycloakDeployment deployment, AdapterTokenStore tokenStore) Methods inherited from class org.keycloak.KeycloakSecurityContext
getAuthorizationContext, getRealm
-
Field Details
-
log
protected static org.jboss.logging.Logger log -
deployment
-
tokenStore
-
refreshToken
-
-
Constructor Details
-
RefreshableKeycloakSecurityContext
public RefreshableKeycloakSecurityContext() -
RefreshableKeycloakSecurityContext
public RefreshableKeycloakSecurityContext(KeycloakDeployment deployment, AdapterTokenStore tokenStore, String tokenString, AccessToken token, String idTokenString, IDToken idToken, String refreshToken)
-
-
Method Details
-
getToken
- Overrides:
getTokenin classKeycloakSecurityContext
-
getTokenString
- Overrides:
getTokenStringin classKeycloakSecurityContext
-
getIdToken
- Overrides:
getIdTokenin classKeycloakSecurityContext
-
getIdTokenString
- Overrides:
getIdTokenStringin classKeycloakSecurityContext
-
getRefreshToken
-
logout
-
isActive
public boolean isActive() -
isTokenTimeToLiveSufficient
-
getDeployment
-
setCurrentRequestInfo
-
refreshExpiredToken
public boolean refreshExpiredToken(boolean checkActive) - Parameters:
checkActive- if true, then we won't send refresh request if current accessToken is still active.- Returns:
- true if accessToken is active or was successfully refreshed
-
setAuthorizationContext
-