org.keycloak.services.migration

## Class DefaultMigrationProvider

- java.lang.Object
- - org.keycloak.services.migration.DefaultMigrationProvider

- All Implemented Interfaces:
    MigrationProvider, Provider

      public class DefaultMigrationProvider
      extends Object
      implements MigrationProvider

  Various common utils needed for migration from older version to newer
  Author:
    Marek Posolda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultMigrationProvider(KeycloakSession session)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClientScopeModel` | `addOIDCMicroprofileJWTClientScope(RealmModel realm)` Adds the `microprofile-jwt` optional client scope to the realm and returns the created scope.
    `ClientScopeModel` | `addOIDCRolesClientScope(RealmModel realm)` Add 'roles' client scope or return it if already exists
    `ClientScopeModel` | `addOIDCWebOriginsClientScope(RealmModel realm)` Add 'web-origins' client scope or return it if already exists
    `void` | `close()`
    `Map<String,ProtocolMapperModel>` | `getBuiltinMappers(String protocol)`
    `List<ProtocolMapperRepresentation>` | `getMappersForClaimMask(Long claimMask)`
    `void` | `setupAdminCli(RealmModel realm)`

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

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

- - ### Constructor Detail

    - #### DefaultMigrationProvider

          public DefaultMigrationProvider(KeycloakSession session)

  - ### Method Detail

    - #### getMappersForClaimMask

          public List<ProtocolMapperRepresentation> getMappersForClaimMask(Long claimMask)

      Specified by:
        `getMappersForClaimMask` in interface `MigrationProvider`
      Parameters:
        `claimMask` - mask used on ClientModel in 1.1.0
      Returns:
        set of 1.2.0.Beta1 protocol mappers corresponding to given claimMask

    - #### getBuiltinMappers

          public Map<String,ProtocolMapperModel> getBuiltinMappers(String protocol)

      Specified by:
        `getBuiltinMappers` in interface `MigrationProvider`

    - #### setupAdminCli

          public void setupAdminCli(RealmModel realm)

      Specified by:
        `setupAdminCli` in interface `MigrationProvider`

    - #### addOIDCRolesClientScope

          public ClientScopeModel addOIDCRolesClientScope(RealmModel realm)

      Description copied from interface: `MigrationProvider`
      Add 'roles' client scope or return it if already exists
      Specified by:
        `addOIDCRolesClientScope` in interface `MigrationProvider`
      Returns:
        created or already existing client scope 'roles'

    - #### addOIDCWebOriginsClientScope

          public ClientScopeModel addOIDCWebOriginsClientScope(RealmModel realm)

      Description copied from interface: `MigrationProvider`
      Add 'web-origins' client scope or return it if already exists
      Specified by:
        `addOIDCWebOriginsClientScope` in interface `MigrationProvider`
      Returns:
        created or already existing client scope 'web-origins'

    - #### addOIDCMicroprofileJWTClientScope

          public ClientScopeModel addOIDCMicroprofileJWTClientScope(RealmModel realm)

      Description copied from interface: `MigrationProvider`
      Adds the `microprofile-jwt` optional client scope to the realm and returns the created scope. If the scope already exists in the realm then the existing scope is returned.
      Specified by:
        `addOIDCMicroprofileJWTClientScope` in interface `MigrationProvider`
      Parameters:
        `realm` - the realm to which the scope is to be added.
      Returns:
        a reference to the `microprofile-jwt` client scope that was either created or already exists in the realm.

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

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