public class AccountRestService extends Object
Modifier and Type | Field and Description |
---|---|
protected ClientConnection |
clientConnection |
protected javax.ws.rs.core.HttpHeaders |
headers |
Constructor and Description |
---|
AccountRestService(KeycloakSession session,
Auth auth,
ClientModel client,
EventBuilder event,
AccountRestApiVersion version) |
Modifier and Type | Method and Description |
---|---|
UserRepresentation |
account()
Get account information.
|
Stream<ClientRepresentation> |
applications(String name) |
AccountCredentialResource |
credentials() |
javax.ws.rs.core.Response |
getConsent(String clientId)
Returns the consent for the client with the given client id.
|
javax.ws.rs.core.Response |
grantConsent(String clientId,
ConsentRepresentation consent)
Creates or updates the consent of the given, requested consent for
the client with the given client id.
|
void |
init() |
LinkedAccountsResource |
linkedAccounts() |
ResourcesService |
resources() |
javax.ws.rs.core.Response |
revokeConsent(String clientId)
Deletes the consent for the client with the given client id.
|
SessionResource |
sessions()
Get session information.
|
javax.ws.rs.core.Response |
updateAccount(UserRepresentation rep) |
javax.ws.rs.core.Response |
updateConsent(String clientId,
ConsentRepresentation consent)
Creates or updates the consent of the given, requested consent for
the client with the given client id.
|
@Context protected javax.ws.rs.core.HttpHeaders headers
@Context protected ClientConnection clientConnection
public AccountRestService(KeycloakSession session, Auth auth, ClientModel client, EventBuilder event, AccountRestApiVersion version)
public void init()
@Path(value="/") @GET @Produces(value="application/json") public UserRepresentation account()
@Path(value="/") @POST @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response updateAccount(UserRepresentation rep)
@Path(value="/sessions") public SessionResource sessions()
@Path(value="/credentials") public AccountCredentialResource credentials()
@Path(value="/resources") public ResourcesService resources()
@Path(value="/applications/{clientId}/consent") @GET @Produces(value="application/json") public javax.ws.rs.core.Response getConsent(@PathParam(value="clientId") String clientId)
clientId
- client id to return the consent for@Path(value="/applications/{clientId}/consent") @DELETE public javax.ws.rs.core.Response revokeConsent(@PathParam(value="clientId") String clientId)
clientId
- client id to delete a consent for@Path(value="/applications/{clientId}/consent") @POST @Produces(value="application/json") public javax.ws.rs.core.Response grantConsent(@PathParam(value="clientId") String clientId, ConsentRepresentation consent)
clientId
- client id to set a consent forconsent
- requested consent for the client@Path(value="/applications/{clientId}/consent") @PUT @Produces(value="application/json") public javax.ws.rs.core.Response updateConsent(@PathParam(value="clientId") String clientId, ConsentRepresentation consent)
clientId
- client id to set a consent forconsent
- requested consent for the client@Path(value="/linked-accounts") public LinkedAccountsResource linkedAccounts()
@Path(value="/applications") @GET @Produces(value="application/json") public Stream<ClientRepresentation> applications(@QueryParam(value="name") String name)
Copyright © 2021 JBoss by Red Hat. All rights reserved.