Digital Authentication Framework  6.0.1.37
Public Member Functions | Static Public Member Functions | List of all members
com.good.daf.auth.AuthProtocol Class Reference

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. More...
 
native boolean requiresNewPassphrase ()
 
native void inputNewPassphrase (byte[] pp)
 Inputs the new/replacement passphrase into the protocol. More...
 
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. More...
 
native byte[] getUserString ()
 Retrieves the current 'user string'. More...
 
native boolean isFinished ()
 
native byte[] getSecret ()
 
native byte[] getNewSecret ()
 
native byte[] getState ()
 
native void dispose ()
 Destroys the native counterparts to this object. More...
 

Static Public Member Functions

static native byte[] extractUserString (byte[] state)
 Retrieves the current 'user string' given the a state string. More...
 
static native AuthProtocol enroll (byte[] authToken)
 Commences the enrollment protocol. More...
 
static native AuthProtocol authenticate (byte[] authToken, byte[] state)
 Commences the authentication protocol. More...
 
static native AuthProtocol changePassphrase (byte[] authToken, byte[] state)
 Commences the passphrase changing protocol. More...
 
static native AuthProtocol enroll (DADevice device, byte[] authToken)
 Commences the enrollment protocol using the given device. More...
 
static native AuthProtocol authenticate (DADevice device, byte[] authToken, byte[] state)
 Commences the authentication protocol using the given device. More...
 
static native AuthProtocol changePassphrase (DADevice device, byte[] authToken, byte[] state)
 Commences the passphrase change protocol using the given device. More...
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
authTokenauth token given to device to create session
statethe state data obtained by the last successful enrollment or change passphrase protocol
Returns
a fresh instance of this class.
static native AuthProtocol com.good.daf.auth.AuthProtocol.authenticate ( DADevice  device,
byte[]  authToken,
byte[]  state 
)
static

Commences the authentication protocol using the given device.

Parameters
devicethe device
authTokenauth token given to device to create session
statethe state data obtain by the last successful enrollment or change passphrase protocol
Returns
a fresh instance of this class.
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.

Parameters
authTokenauth token given to device to create session
statethe state data obtained by the last successful enrollment or change passphrase protocol
Returns
a fresh instance of this class.
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.

Parameters
devicethe device
authTokenauth token given to device to create session
statethe state data obtain by the last successful enrollment or change passphrase protocol
Returns
a fresh instance of this class.
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 ( byte[]  authToken)
static

Commences the enrollment protocol.

The DAF device used is the one returned by the native DADriver::getDevice function.

Parameters
authTokenauth token given to device to create session
Returns
a fresh instance of this class.
static native AuthProtocol com.good.daf.auth.AuthProtocol.enroll ( DADevice  device,
byte[]  authToken 
)
static

Commences the enrollment protocol using the given device.

Parameters
devicethe device
authTokenauth token given to device to create session
Returns
a fresh instance of this class.
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 ( )
Returns
gets the new secret produced by a completed enrollment or change passphrase protocol.
native byte [] com.good.daf.auth.AuthProtocol.getSecret ( )
Returns
gets the secret produced by a completed authentication or change passphrase protocol.
native byte [] com.good.daf.auth.AuthProtocol.getState ( )
Returns
gets the new state produced by a completed enrollment or change passphrase protocol.
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.

Parameters
ppthe 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.

Parameters
ppthe new passphrase. must not be null.
native boolean com.good.daf.auth.AuthProtocol.isFinished ( )
Returns
true if this protocol has completed
    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 ( )
Returns
true if this protocol requires the existing passphrase.
native boolean com.good.daf.auth.AuthProtocol.requiresNewPassphrase ( )
Returns
true if this protocol requires a new or replacement passphrase.
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.


The documentation for this class was generated from the following file: