org.mozilla.jss.util
Interface PasswordCallback
- ConsolePasswordCallback, FilePasswordCallback, NullPasswordCallback, Password
public interface PasswordCallback
Represents a password callback, which is called to login to the key
database and to PKCS #11 tokens.
The simplest implementation of a PasswordCallback is a Password object.
getPasswordAgain
public Password getPasswordAgain(PasswordCallbackInfo info)
throws PasswordCallback.GiveUpException
Tries supplying a password again. This callback will be called if
the first callback returned an invalid password. It will be called
repeatedly until it returns a correct password, or it gives up by
throwing a GiveUpException
.
info
- Information about the token that is being logged into.
- The password. This password object is owned by and will
be cleared by the caller.
getPasswordFirstAttempt
public Password getPasswordFirstAttempt(PasswordCallbackInfo info)
throws PasswordCallback.GiveUpException
Supplies a password. This is called on the first attempt; if it
returns the wrong password, getPasswordAgain
will
be called on subsequent attempts.
info
- Information about the token that is being logged into.
- The password. This password object is owned by and will
be cleared by the caller.