public class DefaultKeycloakContext extends Object implements KeycloakContext
| Constructor and Description |
|---|
DefaultKeycloakContext(KeycloakSession session) |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationSessionModel |
getAuthenticationSession()
Get current AuthenticationSessionModel, can be null out of the AuthenticationSession context.
|
URI |
getAuthServerUrl() |
ClientModel |
getClient() |
ClientConnection |
getConnection() |
<T> T |
getContextObject(Class<T> clazz) |
String |
getContextPath() |
RealmModel |
getRealm() |
javax.ws.rs.core.HttpHeaders |
getRequestHeaders() |
KeycloakUriInfo |
getUri()
Returns the URI assuming it is a frontend request.
|
KeycloakUriInfo |
getUri(UrlType type)
Returns the URI.
|
Locale |
resolveLocale(UserModel user) |
void |
setAuthenticationSession(AuthenticationSessionModel authenticationSession) |
void |
setClient(ClientModel client) |
void |
setRealm(RealmModel realm) |
public DefaultKeycloakContext(KeycloakSession session)
public URI getAuthServerUrl()
getAuthServerUrl in interface KeycloakContextpublic String getContextPath()
getContextPath in interface KeycloakContextpublic KeycloakUriInfo getUri(UrlType type)
KeycloakContextgetUri in interface KeycloakContexttype - the type of the requestpublic KeycloakUriInfo getUri()
KeycloakContextKeycloakContext.getUri(UrlType)getUri in interface KeycloakContextpublic javax.ws.rs.core.HttpHeaders getRequestHeaders()
getRequestHeaders in interface KeycloakContextpublic <T> T getContextObject(Class<T> clazz)
getContextObject in interface KeycloakContextpublic RealmModel getRealm()
getRealm in interface KeycloakContextpublic void setRealm(RealmModel realm)
setRealm in interface KeycloakContextpublic ClientModel getClient()
getClient in interface KeycloakContextpublic void setClient(ClientModel client)
setClient in interface KeycloakContextpublic ClientConnection getConnection()
getConnection in interface KeycloakContextpublic Locale resolveLocale(UserModel user)
resolveLocale in interface KeycloakContextpublic AuthenticationSessionModel getAuthenticationSession()
KeycloakContextgetAuthenticationSession in interface KeycloakContextpublic void setAuthenticationSession(AuthenticationSessionModel authenticationSession)
setAuthenticationSession in interface KeycloakContextCopyright © 2021 JBoss by Red Hat. All rights reserved.