org.keycloak.examples.federation.properties

## Class FilePropertiesFederationProvider

- java.lang.Object
- - org.keycloak.examples.federation.properties.BasePropertiesFederationProvider
  - - org.keycloak.examples.federation.properties.FilePropertiesFederationProvider

- All Implemented Interfaces:
    UserFederationProvider, Provider

      public class FilePropertiesFederationProvider
      extends BasePropertiesFederationProvider

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.UserFederationProvider

      `UserFederationProvider.EditMode`

  - ### Field Summary

    - ### Fields inherited from class org.keycloak.examples.federation.properties.BasePropertiesFederationProvider

      `model, properties, session, supportedCredentialTypes`

    - ### Fields inherited from interface org.keycloak.models.UserFederationProvider

      `EMAIL, FIRST_NAME, LAST_NAME, USERNAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilePropertiesFederationProvider(KeycloakSession session, Properties properties, UserFederationProviderModel model)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `UserModel` | `proxy(UserModel local)` Keycloak will call this method if it finds an imported UserModel.
    `UserModel` | `register(RealmModel realm, UserModel user)` Update the properties file with the new user.
    `boolean` | `removeUser(RealmModel realm, UserModel user)`
    `void` | `save()`
    `boolean` | `synchronizeRegistrations()` Adding new users is supported

    - ### Methods inherited from class org.keycloak.examples.federation.properties.BasePropertiesFederationProvider

      `close, getModel, getProperties, getSession, getSupportedCredentialTypes, getUserByEmail, getUserByUsername, isValid, preRemove, preRemove, searchByAttributes, validCredentials, validCredentials`

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

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

- - ### Constructor Detail

    - #### FilePropertiesFederationProvider

          public FilePropertiesFederationProvider(KeycloakSession session,
                                          Properties properties,
                                          UserFederationProviderModel model)

  - ### Method Detail

    - #### proxy

          public UserModel proxy(UserModel local)

      Keycloak will call this method if it finds an imported UserModel. Here we proxy the UserModel with a Writable proxy which will synchronize updates to username and password back to the properties file
      Parameters:
        `local` -
      Returns:

    - #### synchronizeRegistrations

          public boolean synchronizeRegistrations()

      Adding new users is supported
      Returns:

    - #### save

          public void save()

    - #### register

          public UserModel register(RealmModel realm,
                           UserModel user)

      Update the properties file with the new user.
      Parameters:
        `realm` -
        `user` -
      Returns:

    - #### removeUser

          public boolean removeUser(RealmModel realm,
                           UserModel user)

Copyright © 2015. All Rights Reserved.