org.keycloak.models.utils

## Class FederatedCredentialValidation

- java.lang.Object
- - org.keycloak.models.utils.FederatedCredentialValidation

-     public class FederatedCredentialValidation
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FederatedCredentialValidation()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `validateHashedCredential(KeycloakSession session, RealmModel realm, UserModel user, String unhashedCredValue, UserCredentialValueModel credential)`
    `static boolean` | `validCredential(KeycloakSession session, RealmModel realm, UserModel user, UserCredentialModel credential, List<UserCredentialValueModel> fedCreds)`
    `static boolean` | `validHOTP(KeycloakSession session, RealmModel realm, UserModel user, String otp, List<UserCredentialValueModel> fedCreds)`
    `static boolean` | `validPassword(KeycloakSession session, RealmModel realm, UserModel user, String password, UserCredentialValueModel fedCred)` Will update password if hash iteration policy has changed
    `static boolean` | `validPasswordToken(RealmModel realm, UserModel user, String encodedPasswordToken)`
    `static boolean` | `validSecret(RealmModel realm, UserModel user, String secret, UserCredentialValueModel cred)`
    `static boolean` | `validTOTP(RealmModel realm, UserModel user, String otp, List<UserCredentialValueModel> fedCreds)`

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

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

- - ### Constructor Detail

    - #### FederatedCredentialValidation

          public FederatedCredentialValidation()

  - ### Method Detail

    - #### validPassword

          public static boolean validPassword(KeycloakSession session,
                                              RealmModel realm,
                                              UserModel user,
                                              String password,
                                              UserCredentialValueModel fedCred)

      Will update password if hash iteration policy has changed
      Parameters:
        `realm` -
        `user` -
        `password` -
      Returns:

    - #### validateHashedCredential

          public static boolean validateHashedCredential(KeycloakSession session,
                                                         RealmModel realm,
                                                         UserModel user,
                                                         String unhashedCredValue,
                                                         UserCredentialValueModel credential)

    - #### validPasswordToken

          public static boolean validPasswordToken(RealmModel realm,
                                                   UserModel user,
                                                   String encodedPasswordToken)

    - #### validHOTP

          public static boolean validHOTP(KeycloakSession session,
                                          RealmModel realm,
                                          UserModel user,
                                          String otp,
                                          List<UserCredentialValueModel> fedCreds)

    - #### validTOTP

          public static boolean validTOTP(RealmModel realm,
                                          UserModel user,
                                          String otp,
                                          List<UserCredentialValueModel> fedCreds)

    - #### validSecret

          public static boolean validSecret(RealmModel realm,
                                            UserModel user,
                                            String secret,
                                            UserCredentialValueModel cred)

    - #### validCredential

          public static boolean validCredential(KeycloakSession session,
                                                RealmModel realm,
                                                UserModel user,
                                                UserCredentialModel credential,
                                                List<UserCredentialValueModel> fedCreds)

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