org.keycloak.credential

## Interface CredentialProvider<T extends CredentialModel>

- All Superinterfaces:
    Provider
  All Known Implementing Classes:
    OTPCredentialProvider, PasswordCredentialProvider, WebAuthnCredentialProvider, WebAuthnPasswordlessCredentialProvider

      public interface CredentialProvider<T extends CredentialModel>
      extends Provider

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default void` | `close()`
    `CredentialModel` | `createCredential(RealmModel realm, UserModel user, T credentialModel)`
    `boolean` | `deleteCredential(RealmModel realm, UserModel user, String credentialId)`
    `T` | `getCredentialFromModel(CredentialModel model)`
    `CredentialTypeMetadata` | `getCredentialTypeMetadata(CredentialTypeMetadataContext metadataContext)`
    `default T` | `getDefaultCredential(KeycloakSession session, RealmModel realm, UserModel user)`
    `String` | `getType()`

- - ### Method Detail

    - #### close

          default void close()

      Specified by:
        `close` in interface `Provider`

    - #### getType

          String getType()

    - #### createCredential

          CredentialModel createCredential(RealmModel realm,
                                           UserModel user,
                                           T credentialModel)

    - #### deleteCredential

          boolean deleteCredential(RealmModel realm,
                                   UserModel user,
                                   String credentialId)

    - #### getCredentialFromModel

          T getCredentialFromModel(CredentialModel model)

    - #### getDefaultCredential

          default T getDefaultCredential(KeycloakSession session,
                                         RealmModel realm,
                                         UserModel user)

    - #### getCredentialTypeMetadata

          CredentialTypeMetadata getCredentialTypeMetadata(CredentialTypeMetadataContext metadataContext)

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