Class AccountRestService
- java.lang.Object
- 
- org.keycloak.services.resources.account.AccountRestService
 
- 
 public class AccountRestService extends Object - Author:
- Stian Thorgersen
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected ClientConnectionclientConnectionprotected javax.ws.rs.core.HttpHeadersheaders
 - 
Constructor SummaryConstructors Constructor Description AccountRestService(KeycloakSession session, Auth auth, EventBuilder event, AccountRestApiVersion version)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description UserRepresentationaccount(Boolean userProfileMetadata)Get account information.Stream<ClientRepresentation>applications(String name)AccountCredentialResourcecredentials()javax.ws.rs.core.ResponsegetConsent(String clientId)Returns the consent for the client with the given client id.javax.ws.rs.core.ResponsegrantConsent(String clientId, ConsentRepresentation consent)Creates or updates the consent of the given, requested consent for the client with the given client id.Stream<GroupRepresentation>groupMemberships(boolean briefRepresentation)LinkedAccountsResourcelinkedAccounts()ResourcesServiceresources()javax.ws.rs.core.ResponserevokeConsent(String clientId)Deletes the consent for the client with the given client id.SessionResourcesessions()Get session information.javax.ws.rs.core.ResponseupdateAccount(UserRepresentation rep)javax.ws.rs.core.ResponseupdateConsent(String clientId, ConsentRepresentation consent)Creates or updates the consent of the given, requested consent for the client with the given client id.
 
- 
- 
- 
Field Detail- 
headersprotected final javax.ws.rs.core.HttpHeaders headers 
 - 
clientConnectionprotected final ClientConnection clientConnection 
 
- 
 - 
Constructor Detail- 
AccountRestServicepublic AccountRestService(KeycloakSession session, Auth auth, EventBuilder event, AccountRestApiVersion version) 
 
- 
 - 
Method Detail- 
account@Path("/") @GET @Produces("application/json") public UserRepresentation account(@QueryParam("userProfileMetadata") Boolean userProfileMetadata)Get account information.- Returns:
 
 - 
updateAccount@Path("/") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response updateAccount(UserRepresentation rep)
 - 
sessions@Path("/sessions") public SessionResource sessions()Get session information.- Returns:
 
 - 
credentials@Path("/credentials") public AccountCredentialResource credentials()
 - 
resources@Path("/resources") public ResourcesService resources()
 - 
getConsent@Path("/applications/{clientId}/consent") @GET @Produces("application/json") public javax.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 javax.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 javax.ws.rs.core.Response grantConsent(@PathParam("clientId") String clientId, 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 for
- consent- requested consent for the client
- Returns:
- the created or updated consent
 
 - 
updateConsent@Path("/applications/{clientId}/consent") @PUT @Produces("application/json") public javax.ws.rs.core.Response updateConsent(@PathParam("clientId") String clientId, 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 for
- consent- requested consent for the client
- Returns:
- the created or updated consent
 
 - 
linkedAccounts@Path("/linked-accounts") public LinkedAccountsResource linkedAccounts()
 - 
groupMemberships@Path("/groups") @GET @Produces("application/json") public Stream<GroupRepresentation> groupMemberships(@QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation)
 - 
applications@Path("/applications") @GET @Produces("application/json") public Stream<ClientRepresentation> applications(@QueryParam("name") String name)
 
- 
 
-