Digital Authentication Framework 4.2.0.30
|
This class wraps a native DAAuthProtocol object and exposes its methods. More...
Public Member Functions | |
native boolean | requiresExistingPassphrase () |
native void | inputExistingPassphrase (byte[] pp) |
Inputs the existing passphrase into the protocol. | |
native boolean | requiresNewPassphrase () |
native void | inputNewPassphrase (byte[] pp) |
Inputs the new/replacement passphrase into the protocol. | |
native void | setUserString (byte[] us) |
Alters the 'user string' -- an arbitrary string stored in the state which the caller may use for their own purposes. | |
native byte[] | getUserString () |
Retrieves the current 'user string'. | |
native boolean | isFinished () |
native byte[] | getSecret () |
native byte[] | getNewSecret () |
native byte[] | getState () |
native void | dispose () |
Destroys the native counterparts to this object. | |
Static Public Member Functions | |
static native byte[] | extractUserString (byte[] state) |
Retrieves the current 'user string' given the a state string. | |
static native AuthProtocol | enroll (byte[] authToken) |
Commences the enrollment protocol. | |
static native AuthProtocol | authenticate (byte[] authToken, byte[] state) |
Commences the authentication protocol. | |
static native AuthProtocol | changePassphrase (byte[] authToken, byte[] state) |
Commences the passphrase changing protocol. | |
static native AuthProtocol | enroll (DADevice device, byte[] authToken) |
Commences the enrollment protocol using the given device. | |
static native AuthProtocol | authenticate (DADevice device, byte[] authToken, byte[] state) |
Commences the authentication protocol using the given device. | |
static native AuthProtocol | changePassphrase (DADevice device, byte[] authToken, byte[] state) |
Commences the passphrase change protocol using the given device. |
This class wraps a native DAAuthProtocol object and exposes its methods.
See the documentation for the native class for the precise semantics of the methods here.
Instances of this class own native DAAuthProtocol, (optionally) DADevice, DASession and DAAuthState objects: you *must* call dispose() when finished.
static native AuthProtocol com.good.daf.auth.AuthProtocol.authenticate | ( | byte[] | authToken, |
byte[] | state | ||
) | [static] |
Commences the authentication protocol.
The DAF device used is the one returned by the native DADriver.getDevice function.
authToken | auth token given to device to create session |
state | the state data obtained by the last successful enrollment or change passphrase protocol |
static native AuthProtocol com.good.daf.auth.AuthProtocol.authenticate | ( | DADevice | device, |
byte[] | authToken, | ||
byte[] | state | ||
) | [static] |
Commences the authentication protocol using the given device.
device | the device |
authToken | auth token given to device to create session |
state | the state data obtain by the last successful enrollment or change passphrase protocol |
static native AuthProtocol com.good.daf.auth.AuthProtocol.changePassphrase | ( | DADevice | device, |
byte[] | authToken, | ||
byte[] | state | ||
) | [static] |
Commences the passphrase change protocol using the given device.
device | the device |
authToken | auth token given to device to create session |
state | the state data obtain by the last successful enrollment or change passphrase protocol |
static native AuthProtocol com.good.daf.auth.AuthProtocol.changePassphrase | ( | byte[] | authToken, |
byte[] | state | ||
) | [static] |
Commences the passphrase changing protocol.
The DAF device used is the one returned by the native DADriver.getDevice function.
authToken | auth token given to device to create session |
state | the state data obtained by the last successful enrollment or change passphrase protocol |
native void com.good.daf.auth.AuthProtocol.dispose | ( | ) |
Destroys the native counterparts to this object.
This method must be called or a native memory leak will result. This method may be called more than once (subsequent calls have no effect).
static native AuthProtocol com.good.daf.auth.AuthProtocol.enroll | ( | DADevice | device, |
byte[] | authToken | ||
) | [static] |
Commences the enrollment protocol using the given device.
device | the device |
authToken | auth token given to device to create session |
static native AuthProtocol com.good.daf.auth.AuthProtocol.enroll | ( | byte[] | authToken | ) | [static] |
Commences the enrollment protocol.
The DAF device used is the one returned by the native DADriver.getDevice function.
authToken | auth token given to device to create session |
static native byte [] com.good.daf.auth.AuthProtocol.extractUserString | ( | byte[] | state | ) | [static] |
Retrieves the current 'user string' given the a state string.
Returns null if there is no user string value.
native byte [] com.good.daf.auth.AuthProtocol.getNewSecret | ( | ) |
native byte [] com.good.daf.auth.AuthProtocol.getSecret | ( | ) |
native byte [] com.good.daf.auth.AuthProtocol.getState | ( | ) |
native byte [] com.good.daf.auth.AuthProtocol.getUserString | ( | ) |
Retrieves the current 'user string'.
Returns null if there is no user string value.
native void com.good.daf.auth.AuthProtocol.inputExistingPassphrase | ( | byte[] | pp | ) |
Inputs the existing passphrase into the protocol.
You only need call this if requiresExistingPassphrase returns true.
pp | the existing passphrase. must not be null. |
native void com.good.daf.auth.AuthProtocol.inputNewPassphrase | ( | byte[] | pp | ) |
Inputs the new/replacement passphrase into the protocol.
You only need call this if requiresNewPassphrase returns true.
pp | the new passphrase. must not be null. |
native boolean com.good.daf.auth.AuthProtocol.isFinished | ( | ) |
A completed protocol is one where you can obtain the new/existing secrets and state through the getSecret/getNewSecret/getState methods.
native boolean com.good.daf.auth.AuthProtocol.requiresExistingPassphrase | ( | ) |
native boolean com.good.daf.auth.AuthProtocol.requiresNewPassphrase | ( | ) |
native void com.good.daf.auth.AuthProtocol.setUserString | ( | byte[] | us | ) |
Alters the 'user string' -- an arbitrary string stored in the state which the caller may use for their own purposes.
No encoding or format is required.
This overwrites the current user string. You must persist the changes by calling getState() on this instance and persisting the result.