org.appng.core.security

## Class Sha1PasswordHandler

- java.lang.Object
- - org.appng.core.security.Sha1PasswordHandler

- All Implemented Interfaces:
    PasswordHandler

  Deprecated.
  wille be removed in 2.x

      @Deprecated
      public class Sha1PasswordHandler
      extends Object
      implements PasswordHandler

  Provides methods to hash and validate passwords using the SHA-1 algorithm.
  Author:
    Matthias Herlitzius

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Sha1PasswordHandler(AuthSubject authSubject)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyPassword(String password)` Deprecated. Hashes and sets the password, clears the salt, sets the last changed date for the password
    `String` | `calculatePasswordResetDigest()` Deprecated. Calculates, sets and returns a salted digest which can be used for the "Forgot password?" function.
    `boolean` | `isValidPassword(String password)` Deprecated. Checks whether the password is valid for the current `AuthSubject`.
    `boolean` | `isValidPasswordResetDigest(String digest)` Deprecated. Checks whether the digest is valid for the current `AuthSubject`.
    `void` | `migrate(CoreService service, String password)` Deprecated. Migrates passwords of the current `PasswordHandler` instance to passwords handled by `CoreService.getDefaultPasswordHandler(org.appng.api.model.AuthSubject)`.

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

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

    - ### Methods inherited from interface org.appng.core.security.PasswordHandler

      `getPasswordResetDigest, savePassword, updateSubject`

- - ### Constructor Detail

    - #### Sha1PasswordHandler

          public Sha1PasswordHandler(AuthSubject authSubject)

      Deprecated.

  - ### Method Detail

    - #### applyPassword

          public void applyPassword(String password)

      Deprecated.
      Description copied from interface: `PasswordHandler`
      Hashes and sets the password, clears the salt, sets the last changed date for the password
      Specified by:
        `applyPassword` in interface `PasswordHandler`
      Parameters:
        `password` - The cleartext password.
      See Also:
        `AuthSubject.setDigest(String)`, `AuthSubject.setSalt(String)`, `AuthSubject.setPasswordLastChanged(java.util.Date)`

    - #### isValidPassword

          public boolean isValidPassword(String password)

      Deprecated.
      Description copied from interface: `PasswordHandler`
      Checks whether the password is valid for the current `AuthSubject`.
      Specified by:
        `isValidPassword` in interface `PasswordHandler`
      Parameters:
        `password` - The cleartext password.
      Returns:
        `true` if the password is valid, false if it is invalid.
      See Also:
        `AuthSubject.getDigest()`

    - #### calculatePasswordResetDigest

          public String calculatePasswordResetDigest()

      Deprecated.
      Description copied from interface: `PasswordHandler`
      Calculates, sets and returns a salted digest which can be used for the "Forgot password?" function.
      Specified by:
        `calculatePasswordResetDigest` in interface `PasswordHandler`
      Returns:
        A digest.
      See Also:
        `AuthSubject.setSalt(String)`, `PasswordHandler.isValidPasswordResetDigest(String)`

    - #### isValidPasswordResetDigest

          public boolean isValidPasswordResetDigest(String digest)

      Deprecated.
      Description copied from interface: `PasswordHandler`
      Checks whether the digest is valid for the current `AuthSubject`.
      Specified by:
        `isValidPasswordResetDigest` in interface `PasswordHandler`
      Parameters:
        `digest` - The digest.
      Returns:
        `true` if the digest is valid, false if it is invalid.
      See Also:
        `AuthSubject.getSalt()`, `PasswordHandler.calculatePasswordResetDigest()`

    - #### migrate

          public void migrate(CoreService service,
                              String password)

      Deprecated.
      Description copied from interface: `PasswordHandler`
      Migrates passwords of the current `PasswordHandler` instance to passwords handled by `CoreService.getDefaultPasswordHandler(org.appng.api.model.AuthSubject)`.
      Specified by:
        `migrate` in interface `PasswordHandler`
      Parameters:
        `service` - Instance of `CoreService`
        `password` - The current password.

Copyright © 2011–2023 aiticon GmbH. All rights reserved.