org.keycloak.services.resources.admin

## Class UserFederationProviderResource

- java.lang.Object
- - org.keycloak.services.resources.admin.UserFederationProviderResource

-     public class UserFederationProviderResource
      extends Object

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static ServicesLogger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserFederationProviderResource(KeycloakSession session, RealmModel realm, RealmAuth auth, UserFederationProviderModel federationProviderModel, AdminEventBuilder adminEvent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `addMapper(UserFederationMapperRepresentation mapper)` Create a mapper
    `void` | `delete(String id)` Delete a mapper with a given id
    `void` | `deleteProviderInstance()` Delete a provider
    `UserFederationMapperRepresentation` | `getMapperById(String id)` Get a mapper
    `List<UserFederationMapperRepresentation>` | `getMappers()` Get mappers configured for this provider
    `Map<String,UserFederationMapperTypeRepresentation>` | `getMapperTypes()` Get available user federation mapper types
    `UserFederationProviderRepresentation` | `getProviderInstance()` Get a provider
    `UserFederationSyncResult` | `syncMapperData(String mapperId, String direction)` Trigger sync of mapper data related to federationMapper (roles, groups, ...)
    `UserFederationSyncResult` | `syncUsers(String action)` Trigger sync of users
    `void` | `update(String id, UserFederationMapperRepresentation rep)` Update a mapper
    `void` | `updateProviderInstance(UserFederationProviderRepresentation rep)` Update a provider

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected static final ServicesLogger logger

  - ### Constructor Detail

    - #### UserFederationProviderResource

          public UserFederationProviderResource(KeycloakSession session,
                                                RealmModel realm,
                                                RealmAuth auth,
                                                UserFederationProviderModel federationProviderModel,
                                                AdminEventBuilder adminEvent)

  - ### Method Detail

    - #### updateProviderInstance

          @PUT
           @Consumes(value="application/json")
          public void updateProviderInstance(UserFederationProviderRepresentation rep)

      Update a provider
      Parameters:
        `rep` -

    - #### getProviderInstance

          @GET
           @Produces(value="application/json")
          public UserFederationProviderRepresentation getProviderInstance()

      Get a provider

    - #### deleteProviderInstance

          @DELETE
          public void deleteProviderInstance()

      Delete a provider

    - #### syncUsers

          @POST
           @Path(value="sync")
           @Produces(value="application/json")
          public UserFederationSyncResult syncUsers(@QueryParam(value="action")
                                                                                                                    String action)

      Trigger sync of users
      Returns:

    - #### getMapperTypes

          @GET
           @Path(value="mapper-types")
           @Produces(value="application/json")
          public Map<String,UserFederationMapperTypeRepresentation> getMapperTypes()

      Get available user federation mapper types
      Returns:

    - #### getMappers

          @GET
           @Path(value="mappers")
           @Produces(value="application/json")
          public List<UserFederationMapperRepresentation> getMappers()

      Get mappers configured for this provider
      Returns:

    - #### addMapper

          @POST
           @Path(value="mappers")
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response addMapper(UserFederationMapperRepresentation mapper)

      Create a mapper
      Parameters:
        `mapper` -
      Returns:

    - #### getMapperById

          @GET
           @Path(value="mappers/{id}")
           @Produces(value="application/json")
          public UserFederationMapperRepresentation getMapperById(@PathParam(value="id")
                                                                                                                                         String id)

      Get a mapper
      Parameters:
        `id` - Mapper id
      Returns:

    - #### update

          @PUT
           @Path(value="mappers/{id}")
           @Consumes(value="application/json")
          public void update(@PathParam(value="id")
                                                                                                    String id,
                                                                                                    UserFederationMapperRepresentation rep)

      Update a mapper
      Parameters:
        `id` - Mapper id
        `rep` -

    - #### delete

          @DELETE
           @Path(value="mappers/{id}")
          public void delete(@PathParam(value="id")
                                                                  String id)

      Delete a mapper with a given id
      Parameters:
        `id` - Mapper id

    - #### syncMapperData

          @POST
           @Path(value="mappers/{id}/sync")
           @Produces(value="application/json")
          public UserFederationSyncResult syncMapperData(@PathParam(value="id")
                                                                                                                                      String mapperId,
                                                                                                                                      @QueryParam(value="direction")
                                                                                                                                      String direction)

      Trigger sync of mapper data related to federationMapper (roles, groups, ...)
      Returns:

Copyright © 2016 JBoss by Red Hat. All rights reserved.