public class AccountCredentialResource extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AccountCredentialResource.CredentialContainer |
static class |
AccountCredentialResource.PasswordDetails |
static class |
AccountCredentialResource.PasswordUpdate |
Modifier and Type | Field and Description |
---|---|
static String |
ENABLED_ONLY |
static String |
TYPE |
static String |
USER_CREDENTIALS |
Constructor and Description |
---|
AccountCredentialResource(KeycloakSession session,
EventBuilder event,
UserModel user,
Auth auth) |
Modifier and Type | Method and Description |
---|---|
List<AccountCredentialResource.CredentialContainer> |
credentialTypes(String type,
Boolean userCredentials)
Retrieve the list of credentials available to the current logged in user.
|
AccountCredentialResource.PasswordDetails |
passwordDetails() |
javax.ws.rs.core.Response |
passwordUpdate(AccountCredentialResource.PasswordUpdate update) |
void |
removeCredential(String credentialId)
Remove a credential of current user
|
void |
setLabel(String credentialId,
String userLabel)
Update a user label of specified credential of current user
|
public static final String TYPE
public static final String ENABLED_ONLY
public static final String USER_CREDENTIALS
public AccountCredentialResource(KeycloakSession session, EventBuilder event, UserModel user, Auth auth)
@GET @Produces(value="application/json") public List<AccountCredentialResource.CredentialContainer> credentialTypes(@QueryParam(value="type") String type, @QueryParam(value="user-credentials") Boolean userCredentials)
type
- Allows to filter just single credential type, which will be specified as this parameter. If null, it will return all credential typesuserCredentials
- specifies if user credentials should be returned. If true, they will be returned in the "userCredentials" attribute of
particular credential. Defaults to true.@Path(value="{credentialId}") @DELETE public void removeCredential(@PathParam(value="credentialId") String credentialId)
credentialId
- ID of the credential, which will be removed@PUT @Consumes(value="application/json") @Path(value="{credentialId}/label") public void setLabel(@PathParam(value="credentialId") String credentialId, String userLabel)
credentialId
- ID of the credential, which will be updateduserLabel
- new user label as JSON string@GET @Path(value="password") @Produces(value="application/json") public AccountCredentialResource.PasswordDetails passwordDetails() throws IOException
IOException
@POST @Path(value="password") @Consumes(value="application/json") public javax.ws.rs.core.Response passwordUpdate(AccountCredentialResource.PasswordUpdate update)
Copyright © 2020 JBoss by Red Hat. All rights reserved.