Class PasswordCredentialHash

java.lang.Object
com.okta.sdk.resource.model.PasswordCredentialHash
All Implemented Interfaces:
Serializable

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-09-23T16:19:57.008753975Z[Etc/UTC]", comments="Generator version: 7.8.0") public class PasswordCredentialHash extends Object implements Serializable
Specifies a hashed password to import into Okta. This allows an existing password to be imported into Okta directly from some other store. Okta supports the BCRYPT, SHA-512, SHA-256, SHA-1, MD5, and PBKDF2 hash functions for password import. A hashed password may be specified in a Password object when creating or updating a user, but not for other operations. See [Create User with Imported Hashed Password](https://developer.okta.com/docs/reference/api/users/#create-user-with-imported-hashed-password) for information on using this object when creating a user. When updating a User with a hashed password, the User must be in the `STAGED` status.
See Also:
  • Field Details

  • Constructor Details

    • PasswordCredentialHash

      public PasswordCredentialHash()
  • Method Details

    • algorithm

    • getAlgorithm

      Get algorithm
      Returns:
      algorithm
    • setAlgorithm

      public void setAlgorithm(PasswordCredentialHashAlgorithm algorithm)
    • digestAlgorithm

      public PasswordCredentialHash digestAlgorithm(DigestAlgorithm digestAlgorithm)
    • getDigestAlgorithm

      @Nullable public DigestAlgorithm getDigestAlgorithm()
      Get digestAlgorithm
      Returns:
      digestAlgorithm
    • setDigestAlgorithm

      public void setDigestAlgorithm(DigestAlgorithm digestAlgorithm)
    • iterationCount

      public PasswordCredentialHash iterationCount(Integer iterationCount)
    • getIterationCount

      @Nullable public Integer getIterationCount()
      The number of iterations used when hashing passwords using PBKDF2. Must be >= 4096. Only required for PBKDF2 algorithm.
      Returns:
      iterationCount
    • setIterationCount

      public void setIterationCount(Integer iterationCount)
    • keySize

      public PasswordCredentialHash keySize(Integer keySize)
    • getKeySize

      @Nullable public Integer getKeySize()
      Size of the derived key in bytes. Only required for PBKDF2 algorithm.
      Returns:
      keySize
    • setKeySize

      public void setKeySize(Integer keySize)
    • salt

      public PasswordCredentialHash salt(String salt)
    • getSalt

      @Nullable public String getSalt()
      Only required for salted hashes. For BCRYPT, this specifies Radix-64 as the encoded salt used to generate the hash, which must be 22 characters long. For other salted hashes, this specifies the Base64-encoded salt used to generate the hash.
      Returns:
      salt
    • setSalt

      public void setSalt(String salt)
    • saltOrder

      public PasswordCredentialHash saltOrder(String saltOrder)
    • getSaltOrder

      @Nullable public String getSaltOrder()
      Specifies whether salt was pre- or postfixed to the password before hashing. Only required for salted algorithms.
      Returns:
      saltOrder
    • setSaltOrder

      public void setSaltOrder(String saltOrder)
    • value

      public PasswordCredentialHash value(String value)
    • getValue

      @Nullable public String getValue()
      For SHA-512, SHA-256, SHA-1, MD5, and PBKDF2, this is the actual base64-encoded hash of the password (and salt, if used). This is the Base64-encoded `value` of the SHA-512/SHA-256/SHA-1/MD5/PBKDF2 digest that was computed by either pre-fixing or post-fixing the `salt` to the `password`, depending on the `saltOrder`. If a `salt` was not used in the `source` system, then this should just be the Base64-encoded `value` of the password's SHA-512/SHA-256/SHA-1/MD5/PBKDF2 digest. For BCRYPT, this is the actual Radix-64 encoded hashed password.
      Returns:
      value
    • setValue

      public void setValue(String value)
    • workFactor

      public PasswordCredentialHash workFactor(Integer workFactor)
    • getWorkFactor

      @Nullable public Integer getWorkFactor()
      Governs the strength of the hash and the time required to compute it. Only required for BCRYPT algorithm. minimum: 1 maximum: 20
      Returns:
      workFactor
    • setWorkFactor

      public void setWorkFactor(Integer workFactor)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object