Package org.keycloak.services.util
Class DefaultClientSessionContext
java.lang.Object
org.keycloak.services.util.DefaultClientSessionContext
- All Implemented Interfaces:
 ClientSessionContext
Not thread safe. It's per-request object
- Author:
 - Marek Posolda
 
- 
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultClientSessionContextfromClientSessionAndClientScopes(AuthenticatedClientSessionModel clientSession, Set<ClientScopeModel> requestedScopes, KeycloakSession session) static DefaultClientSessionContextfromClientSessionAndScopeParameter(AuthenticatedClientSessionModel clientSession, String scopeParam, KeycloakSession session) static DefaultClientSessionContextfromClientSessionScopeParameter(AuthenticatedClientSessionModel clientSession, KeycloakSession session) Useful if we want to "re-compute" client scopes based on the scope parameter<T> TgetAttribute(String name, Class<T> clazz) Returns client scopes as a stream.Returns protocol mappers as a stream.Returns all roles including composite ones as a stream.getScopeString(boolean ignoreIncludeInTokenScope) booleanvoidsetAttribute(String name, Object value)  
- 
Method Details
- 
fromClientSessionScopeParameter
public static DefaultClientSessionContext fromClientSessionScopeParameter(AuthenticatedClientSessionModel clientSession, KeycloakSession session) Useful if we want to "re-compute" client scopes based on the scope parameter - 
fromClientSessionAndScopeParameter
public static DefaultClientSessionContext fromClientSessionAndScopeParameter(AuthenticatedClientSessionModel clientSession, String scopeParam, KeycloakSession session)  - 
fromClientSessionAndClientScopes
public static DefaultClientSessionContext fromClientSessionAndClientScopes(AuthenticatedClientSessionModel clientSession, Set<ClientScopeModel> requestedScopes, KeycloakSession session)  - 
getClientSession
- Specified by:
 getClientSessionin interfaceClientSessionContext
 - 
getClientScopeIds
- Specified by:
 getClientScopeIdsin interfaceClientSessionContext
 - 
getClientScopesStream
Description copied from interface:ClientSessionContextReturns client scopes as a stream.- Specified by:
 getClientScopesStreamin interfaceClientSessionContext- Returns:
 - Stream of client scopes. Never returns 
null. 
 - 
isOfflineTokenRequested
public boolean isOfflineTokenRequested()- Specified by:
 isOfflineTokenRequestedin interfaceClientSessionContext- Returns:
 - true if offline token is requested
 
 - 
getRolesStream
Description copied from interface:ClientSessionContextReturns all roles including composite ones as a stream.- Specified by:
 getRolesStreamin interfaceClientSessionContext- Returns:
 - Stream of 
RoleModel. Never returnsnull. 
 - 
getProtocolMappersStream
Description copied from interface:ClientSessionContextReturns protocol mappers as a stream.- Specified by:
 getProtocolMappersStreamin interfaceClientSessionContext- Returns:
 - Stream of protocol mappers. Never returns 
null. 
 - 
getScopeString
- Specified by:
 getScopeStringin interfaceClientSessionContext
 - 
getScopeString
- Specified by:
 getScopeStringin interfaceClientSessionContext
 - 
setAttribute
- Specified by:
 setAttributein interfaceClientSessionContext
 - 
getAttribute
- Specified by:
 getAttributein interfaceClientSessionContext
 - 
getAuthorizationRequestContext
- Specified by:
 getAuthorizationRequestContextin interfaceClientSessionContext
 
 -