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) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
account()
Get account information.
|
javax.ws.rs.core.Response |
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() |
javax.ws.rs.core.Response |
preflight()
CORS preflight
|
javax.ws.rs.core.Response |
removeTOTP() |
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 userRep) |
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)
public void init()
@Path(value="/") @OPTIONS public javax.ws.rs.core.Response preflight()
@Path(value="/") @GET @Produces(value="application/json") public javax.ws.rs.core.Response account()
@Path(value="/") @POST @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response updateAccount(UserRepresentation userRep)
@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="/totp/remove") @DELETE public javax.ws.rs.core.Response removeTOTP()
@Path(value="/linked-accounts") public LinkedAccountsResource linkedAccounts()
@Path(value="/applications") @GET @Produces(value="application/json") public javax.ws.rs.core.Response applications(@QueryParam(value="name") String name)
Copyright © 2020 JBoss by Red Hat. All rights reserved.