Class AccountRestService
java.lang.Object
org.keycloak.services.resources.account.AccountRestService
- Author:
- Stian Thorgersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ClientConnectionprotected final jakarta.ws.rs.core.HttpHeaders -
Constructor Summary
ConstructorsConstructorDescriptionAccountRestService(KeycloakSession session, Auth auth, EventBuilder event, AccountRestApiVersion version) -
Method Summary
Modifier and TypeMethodDescriptionorg.keycloak.representations.account.UserRepresentationGet account information.Stream<org.keycloak.representations.account.ClientRepresentation>applications(String name) jakarta.ws.rs.core.ResponsegetConsent(String clientId) Returns the consent for the client with the given client id.jakarta.ws.rs.core.ResponsegrantConsent(String clientId, org.keycloak.representations.account.ConsentRepresentation consent) Creates or updates the consent of the given, requested consent for the client with the given client id.Stream<org.keycloak.representations.idm.GroupRepresentation>groupMemberships(boolean briefRepresentation) jakarta.ws.rs.core.ResponserevokeConsent(String clientId) Deletes the consent for the client with the given client id.sessions()Get session information.jakarta.ws.rs.core.ResponseupdateAccount(org.keycloak.representations.account.UserRepresentation rep) jakarta.ws.rs.core.ResponseupdateConsent(String clientId, org.keycloak.representations.account.ConsentRepresentation consent) Creates or updates the consent of the given, requested consent for the client with the given client id.
-
Field Details
-
headers
protected final jakarta.ws.rs.core.HttpHeaders headers -
clientConnection
-
-
Constructor Details
-
AccountRestService
public AccountRestService(KeycloakSession session, Auth auth, EventBuilder event, AccountRestApiVersion version)
-
-
Method Details
-
account
@Path("/") @GET @Produces("application/json") public org.keycloak.representations.account.UserRepresentation account(@QueryParam("userProfileMetadata") Boolean userProfileMetadata) Get account information.- Returns:
-
updateAccount
@Path("/") @POST @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response updateAccount(org.keycloak.representations.account.UserRepresentation rep) -
sessions
Get session information.- Returns:
-
credentials
-
resources
-
supportedLocales
-
organizations
-
getConsent
@Path("/applications/{clientId}/consent") @GET @Produces("application/json") public jakarta.ws.rs.core.Response getConsent(@PathParam("clientId") String clientId) Returns the consent for the client with the given client id.- Parameters:
clientId- client id to return the consent for- Returns:
- consent of the client
-
revokeConsent
@Path("/applications/{clientId}/consent") @DELETE public jakarta.ws.rs.core.Response revokeConsent(@PathParam("clientId") String clientId) Deletes the consent for the client with the given client id.- Parameters:
clientId- client id to delete a consent for- Returns:
- returns 202 if deleted
-
grantConsent
@Path("/applications/{clientId}/consent") @POST @Produces("application/json") public jakarta.ws.rs.core.Response grantConsent(@PathParam("clientId") String clientId, org.keycloak.representations.account.ConsentRepresentation consent) Creates or updates the consent of the given, requested consent for the client with the given client id. Returns the appropriate REST response.- Parameters:
clientId- client id to set a consent forconsent- requested consent for the client- Returns:
- the created or updated consent
-
updateConsent
@Path("/applications/{clientId}/consent") @PUT @Produces("application/json") public jakarta.ws.rs.core.Response updateConsent(@PathParam("clientId") String clientId, org.keycloak.representations.account.ConsentRepresentation consent) Creates or updates the consent of the given, requested consent for the client with the given client id. Returns the appropriate REST response.- Parameters:
clientId- client id to set a consent forconsent- requested consent for the client- Returns:
- the created or updated consent
-
linkedAccounts
-
groupMemberships
@Path("/groups") @GET @Produces("application/json") public Stream<org.keycloak.representations.idm.GroupRepresentation> groupMemberships(@QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation) -
applications
-