Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jss.util
Class NullPasswordCallback

    java.lang.Object
      |
      +--org.mozilla.jss.util.NullPasswordCallback

All Implemented Interfaces:
  PasswordCallback

public class NullPasswordCallback
extends java.lang.Object
implements PasswordCallback

A PasswordCallback that immediately gives up. This should be used when a user is not available to enter a password. Any operations that require a password will fail if this is used, unless the token has already been logged in manually.

See Also:
  `CryptoToken.login(org.mozilla.jss.util.PasswordCallback)`

Inner classes inherited from class org.mozilla.jss.util.PasswordCallback
`PasswordCallback.GiveUpException`

Constructor Summary
`NullPasswordCallback()`

Method Summary
`Password` | `getPasswordAgain(PasswordCallbackInfo info)` Tries supplying a password again.
`Password` | `getPasswordFirstAttempt(PasswordCallbackInfo info)` Supplies a password.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Constructor Detail

### NullPasswordCallback

    public NullPasswordCallback()

Method Detail

### getPasswordFirstAttempt

    public Password getPasswordFirstAttempt(PasswordCallbackInfo info)
                                     throws PasswordCallback.GiveUpException

  Description copied from interface: `PasswordCallback`
  Supplies a password. This is called on the first attempt; if it returns the wrong password, `getPasswordAgain` will be called on subsequent attempts.
  Specified by:
    `getPasswordFirstAttempt` in interface `PasswordCallback`
  Following copied from interface: `org.mozilla.jss.util.PasswordCallback`
  Parameters:
    `info` - Information about the token that is being logged into.
  Returns:
    The password. This password object is owned by and will be cleared by the caller.
  Throws:
    `PasswordCallback.GiveUpException` - If the callback does not want to supply a password.

### getPasswordAgain

    public Password getPasswordAgain(PasswordCallbackInfo info)
                              throws PasswordCallback.GiveUpException

  Description copied from interface: `PasswordCallback`
  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`.
  Specified by:
    `getPasswordAgain` in interface `PasswordCallback`
  Following copied from interface: `org.mozilla.jss.util.PasswordCallback`
  Parameters:
    `info` - Information about the token that is being logged into.
  Throws:
    `PasswordCallback.GiveUpException` - If the callback does not want to supply a password. This may often be the case if the first attempt failed.

Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD