org.keycloak.services.resources.admin

## Class UserFederationProvidersResource

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

-     public class UserFederationProvidersResource
      extends Object

  Base resource for managing users
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `UserFederationProvidersResource.UserFederationProviderFactoryDescription`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AdminEventBuilder` | `adminEvent`
    `protected RealmAuth` | `auth`
    `protected static ServicesLogger` | `logger`
    `protected RealmModel` | `realm`
    `protected KeycloakSession` | `session`
    `protected javax.ws.rs.core.UriInfo` | `uriInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserFederationProvidersResource(RealmModel realm, RealmAuth auth, AdminEventBuilder adminEvent)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `checkKerberosCredential(KeycloakSession session, RealmModel realm, UserFederationProviderModel model)` Automatically add "kerberos" to required realm credentials if it's supported by saved provider
    `javax.ws.rs.core.Response` | `createProviderInstance(UserFederationProviderRepresentation rep)` Create a provider
    `UserFederationProviderFactoryRepresentation` | `getProvider(String id)` Get factory with given id
    `List<UserFederationProviderFactoryRepresentation>` | `getProviders()` Get available provider factories Returns a list of available provider factories.
    `UserFederationProviderResource` | `getUserFederationInstance(String id)`
    `List<UserFederationProviderRepresentation>` | `getUserFederationInstances()` Get configured providers
    `static void` | `validateFederationProviderConfig(KeycloakSession session, RealmAuth auth, RealmModel realm, UserFederationProviderModel model)`

    - ### 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

    - #### realm

          protected RealmModel realm

    - #### auth

          protected RealmAuth auth

    - #### adminEvent

          protected AdminEventBuilder adminEvent

    - #### uriInfo

          @Context
          protected javax.ws.rs.core.UriInfo uriInfo

    - #### session

          @Context
          protected KeycloakSession session

  - ### Constructor Detail

    - #### UserFederationProvidersResource

          public UserFederationProvidersResource(RealmModel realm,
                                                 RealmAuth auth,
                                                 AdminEventBuilder adminEvent)

  - ### Method Detail

    - #### checkKerberosCredential

          public static boolean checkKerberosCredential(KeycloakSession session,
                                                        RealmModel realm,
                                                        UserFederationProviderModel model)

      Automatically add "kerberos" to required realm credentials if it's supported by saved provider
      Parameters:
        `realm` -
        `model` -
      Returns:
        true if kerberos credentials were added

    - #### validateFederationProviderConfig

          public static void validateFederationProviderConfig(KeycloakSession session,
                                                              RealmAuth auth,
                                                              RealmModel realm,
                                                              UserFederationProviderModel model)

    - #### getProviders

          @GET
           @Path(value="providers")
           @Produces(value="application/json")
          public List<UserFederationProviderFactoryRepresentation> getProviders()

      Get available provider factories Returns a list of available provider factories.
      Returns:

    - #### getProvider

          @GET
           @Path(value="providers/{id}")
           @Produces(value="application/json")
          public UserFederationProviderFactoryRepresentation getProvider(@PathParam(value="id")
                                                                                                                                                  String id)

      Get factory with given id
      Returns:

    - #### createProviderInstance

          @POST
           @Path(value="instances")
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response createProviderInstance(UserFederationProviderRepresentation rep)

      Create a provider
      Parameters:
        `rep` -
      Returns:

    - #### getUserFederationInstances

          @GET
           @Path(value="instances")
           @Produces(value="application/json")
          public List<UserFederationProviderRepresentation> getUserFederationInstances()

      Get configured providers
      Returns:

    - #### getUserFederationInstance

          @Path(value="instances/{id}")
          public UserFederationProviderResource getUserFederationInstance(@PathParam(value="id")
                                                                                                        String id)

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