Class AdminRoot
- java.lang.Object
-
- org.keycloak.services.resources.admin.AdminRoot
-
@Path("/admin") public class AdminRoot extends Object
Root resource for admin console and admin REST API- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.jboss.logging.Logger
logger
protected KeycloakSession
session
protected TokenManager
tokenManager
-
Constructor Summary
Constructors Constructor Description AdminRoot()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static javax.ws.rs.core.UriBuilder
adminBaseUrl(javax.ws.rs.core.UriBuilder base)
static javax.ws.rs.core.UriBuilder
adminBaseUrl(javax.ws.rs.core.UriInfo uriInfo)
static javax.ws.rs.core.UriBuilder
adminConsoleUrl(javax.ws.rs.core.UriBuilder base)
static javax.ws.rs.core.UriBuilder
adminConsoleUrl(javax.ws.rs.core.UriInfo uriInfo)
protected AdminAuth
authenticateRealmAdminRequest(javax.ws.rs.core.HttpHeaders headers)
AdminConsole
getAdminConsole(String name)
path to realm admin console uistatic Properties
getMessages(KeycloakSession session, RealmModel realm, String lang)
static Properties
getMessages(KeycloakSession session, RealmModel realm, String lang, String... bundles)
Object
getRealmsAdmin()
Base Path to realm admin REST interfaceObject
getServerInfo()
General information about the serverstatic Theme
getTheme(KeycloakSession session, RealmModel realm)
javax.ws.rs.core.Response
masterRealmAdminConsoleRedirect()
Convenience path to master realm admin consolejavax.ws.rs.core.Response
masterRealmAdminConsoleRedirectHtml()
Convenience path to master realm admin consoleObject
preFlight()
static javax.ws.rs.core.UriBuilder
realmsUrl(javax.ws.rs.core.UriBuilder base)
static javax.ws.rs.core.UriBuilder
realmsUrl(javax.ws.rs.core.UriInfo uriInfo)
protected void
resolveRealmAndUpdateSession(String name, KeycloakSession session)
-
-
-
Field Detail
-
logger
protected static final org.jboss.logging.Logger logger
-
tokenManager
protected TokenManager tokenManager
-
session
@Context protected KeycloakSession session
-
-
Method Detail
-
adminBaseUrl
public static javax.ws.rs.core.UriBuilder adminBaseUrl(javax.ws.rs.core.UriInfo uriInfo)
-
adminBaseUrl
public static javax.ws.rs.core.UriBuilder adminBaseUrl(javax.ws.rs.core.UriBuilder base)
-
masterRealmAdminConsoleRedirect
@GET public javax.ws.rs.core.Response masterRealmAdminConsoleRedirect()
Convenience path to master realm admin console- Returns:
-
masterRealmAdminConsoleRedirectHtml
@Path("index.{html:html}") @GET public javax.ws.rs.core.Response masterRealmAdminConsoleRedirectHtml()
Convenience path to master realm admin console- Returns:
-
resolveRealmAndUpdateSession
protected void resolveRealmAndUpdateSession(String name, KeycloakSession session)
-
adminConsoleUrl
public static javax.ws.rs.core.UriBuilder adminConsoleUrl(javax.ws.rs.core.UriInfo uriInfo)
-
adminConsoleUrl
public static javax.ws.rs.core.UriBuilder adminConsoleUrl(javax.ws.rs.core.UriBuilder base)
-
getAdminConsole
@Path("{realm}/console") public AdminConsole getAdminConsole(@PathParam("realm") String name)
path to realm admin console ui- Parameters:
name
- Realm name (not id!)- Returns:
-
authenticateRealmAdminRequest
protected AdminAuth authenticateRealmAdminRequest(javax.ws.rs.core.HttpHeaders headers)
-
realmsUrl
public static javax.ws.rs.core.UriBuilder realmsUrl(javax.ws.rs.core.UriInfo uriInfo)
-
realmsUrl
public static javax.ws.rs.core.UriBuilder realmsUrl(javax.ws.rs.core.UriBuilder base)
-
getRealmsAdmin
@Path("realms") public Object getRealmsAdmin()
Base Path to realm admin REST interface- Parameters:
headers
-- Returns:
-
preFlight
@Path("{any:.*}") @OPTIONS public Object preFlight()
-
getServerInfo
@Path("serverinfo") public Object getServerInfo()
General information about the server- Parameters:
headers
-- Returns:
-
getTheme
public static Theme getTheme(KeycloakSession session, RealmModel realm) throws IOException
- Throws:
IOException
-
getMessages
public static Properties getMessages(KeycloakSession session, RealmModel realm, String lang)
-
getMessages
public static Properties getMessages(KeycloakSession session, RealmModel realm, String lang, String... bundles)
-
-