Interface PasswordProvider


  • public interface PasswordProvider
    PasswordProvider implementations are able to produce a password from somewhere. The source of the password data is implementation-specific.

    The getPassword() method may be called multiple times as needed, so the caller does not need to (and should not) keep the password data in memory for longer than absolutely necessary. Users of this class should erase the password array by calling Arrays.fill(char[], char) immediately when authentication is complete and the password data is no longer needed.

    • Method Detail

      • getPassword

        char[] getPassword()
        Returns a new char[] array with the password characters.

        It is the responsibility of the caller to erase this data by calling Arrays.fill(char[], char) immediately when authentication is complete and the password data is no longer needed.

        Returns:
        a copy of the password