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 KeycloakContext
public String getContextPath()
getContextPath
in interface KeycloakContext
public KeycloakUriInfo getUri(UrlType type)
KeycloakContext
getUri
in interface KeycloakContext
type
- the type of the requestpublic KeycloakUriInfo getUri()
KeycloakContext
KeycloakContext.getUri(UrlType)
getUri
in interface KeycloakContext
public javax.ws.rs.core.HttpHeaders getRequestHeaders()
getRequestHeaders
in interface KeycloakContext
public <T> T getContextObject(Class<T> clazz)
getContextObject
in interface KeycloakContext
public RealmModel getRealm()
getRealm
in interface KeycloakContext
public void setRealm(RealmModel realm)
setRealm
in interface KeycloakContext
public ClientModel getClient()
getClient
in interface KeycloakContext
public void setClient(ClientModel client)
setClient
in interface KeycloakContext
public ClientConnection getConnection()
getConnection
in interface KeycloakContext
public Locale resolveLocale(UserModel user)
resolveLocale
in interface KeycloakContext
public AuthenticationSessionModel getAuthenticationSession()
KeycloakContext
getAuthenticationSession
in interface KeycloakContext
public void setAuthenticationSession(AuthenticationSessionModel authenticationSession)
setAuthenticationSession
in interface KeycloakContext
Copyright © 2021 JBoss by Red Hat. All rights reserved.