org.keycloak.models.utils

## Class CredentialValidation

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

-     public class CredentialValidation
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CredentialValidation()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `validCredentials(RealmModel realm, UserModel user, List<UserCredentialModel> credentials)` Must validate all credentials.
    `static boolean` | `validCredentials(RealmModel realm, UserModel user, UserCredentialModel... credentials)` Must validate all credentials.
    `static boolean` | `validPassword(RealmModel realm, UserModel user, String password)` 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)`
    `static boolean` | `validTOTP(RealmModel realm, UserModel user, String otp)`

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

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

- - ### Constructor Detail

    - #### CredentialValidation

          public CredentialValidation()

  - ### Method Detail

    - #### validPassword

          public static boolean validPassword(RealmModel realm,
                              UserModel user,
                              String password)

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

    - #### validPasswordToken

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

    - #### validTOTP

          public static boolean validTOTP(RealmModel realm,
                          UserModel user,
                          String otp)

    - #### validSecret

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

    - #### validCredentials

          public static boolean validCredentials(RealmModel realm,
                                 UserModel user,
                                 List<UserCredentialModel> credentials)

      Must validate all credentials. FYI, password hashes may be rehashed and updated based on realm hash password policies.
      Parameters:
        `realm` -
        `user` -
        `credentials` -
      Returns:

    - #### validCredentials

          public static boolean validCredentials(RealmModel realm,
                                 UserModel user,
                                 UserCredentialModel... credentials)

      Must validate all credentials. FYI, password hashes may be rehashed and updated based on realm hash password policies.
      Parameters:
        `realm` -
        `user` -
        `credentials` -
      Returns:

Copyright © 2014. All Rights Reserved.