Class LinkedAccountsResource

java.lang.Object
org.keycloak.services.resources.account.LinkedAccountsResource

public class LinkedAccountsResource extends Object
API for linking/unlinking social login accounts
Author:
Stan Silvert
  • Constructor Details

  • Method Details

    • linkedAccounts

      @GET @Path("/") @Produces("application/json") public jakarta.ws.rs.core.Response linkedAccounts(@QueryParam("linked") Boolean linked, @QueryParam("search") String search, @QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults)
      Returns the enabled identity providers the user is currently linked to, or those available for the user to link their account to.When the linked param is true, all providers currently linked to the user are returned in the form of LinkedAccountRepresentation objects, including those associated with organizations.

      When the linked param is false, only the identity providers not linked to organizations (i.e. realm level providers) will be returned and be made available for linking.
      Parameters:
      linked - a Boolean indicating whether to return only the linked providers (true) or only the providers available for linking (false).
      search - Filter to search specific providers by name. Search can be prefixed (name*), contains (*name*) or exact (\"name\"). Default prefixed.
      firstResult - Pagination offset.
      maxResults - Maximum results size.
      Returns:
      a set of LinkedAccountRepresentation sorted by the {code guiOrder}.
    • getLinkedAccounts

      @Deprecated public List<LinkedAccountRepresentation> getLinkedAccounts(KeycloakSession session, RealmModel realm, UserModel user)
      Deprecated.
    • buildLinkedAccountURI

      @GET @Path("/{providerAlias}") @Produces("application/json") @Deprecated public jakarta.ws.rs.core.Response buildLinkedAccountURI(@PathParam("providerAlias") String providerAlias, @QueryParam("redirectUri") String redirectUri)
      Deprecated.
    • removeLinkedAccount

      @DELETE @Path("/{providerAlias}") @Produces("application/json") public jakarta.ws.rs.core.Response removeLinkedAccount(@PathParam("providerAlias") String providerAlias)