Digital Authentication Framework  6.0.1.37
Public Member Functions | Protected Attributes | List of all members
com.good.daf.app.ChangeDeviceProcessParams Class Reference

A collection of parameters for completing an DAF device change operation in a background thread. More...

Inheritance diagram for com.good.daf.app.ChangeDeviceProcessParams:
com.good.daf.app.GeneralProcessParams com.good.daf.app.ProgressCallback

Public Member Functions

void start ()
 Start the device change process. More...
 
void setOldDevice (DADevice dev)
 The old, currently-enrolled DADevice to use in the protocol. More...
 
DADevice getOldDevice ()
 
void setOldAuthToken (byte[] token)
 Sets the DAF authentication token for use with the old device. More...
 
byte[] getOldAuthToken ()
 
void setNewDevice (DADevice dev)
 The new DADevice to use in the protocol. More...
 
DADevice getNewDevice ()
 
void setNewAuthToken (byte[] token)
 Sets the DAF authentication token for use with the new device. More...
 
byte[] getNewAuthToken ()
 
void setState (byte[] st)
 Set the state string. More...
 
byte[] getState ()
 
byte[] getUserString ()
 
byte[] getNewUserString ()
 
void setNewUserString (byte[] us)
 Sets the new user string, which will be stored after this protocol completes successfully. More...
 
void setPassphrase (byte[] pass)
 Inputs the pre-collected passphrase. More...
 
byte[] getPassphrase ()
 Gets the pre-collected passphrase. More...
 
void setPassphraseCallback (PassphraseCallback pc)
 Sets the passphrase collection callback. More...
 
- Public Member Functions inherited from com.good.daf.app.GeneralProcessParams
void setDevice (DADevice dev)
 The DADevice to use in the protocol. More...
 
DADevice getDevice ()
 
void setProgressCallback (ProgressCallback cb)
 Sets the progress callback which will be triggered during the protocol. More...
 
void onStart ()
 Called on the UI thread when the background processing thread is about to start work. More...
 
void onSuccess ()
 Called on the UI thread when the background processing thread completes its work successfully. More...
 
void onError (Exception e)
 Called on the UI thread when the background processing thread fails due to an error. More...
 

Protected Attributes

DADevice oldDevice
 
DADevice newDevice
 
byte[] state
 
byte[] passphrase
 
byte[] oldAuthToken = new byte[] {}
 
byte[] newAuthToken = new byte[] {}
 
byte[] newUserString = null
 
PassphraseCallback passphraseCallback
 
- Protected Attributes inherited from com.good.daf.app.GeneralProcessParams
DADevice device
 
ProgressCallback progressCallback
 

Detailed Description

A collection of parameters for completing an DAF device change operation in a background thread.

A device change involves authentication with the 'old device', and enrollment with the 'new device', followed by changing the passphrase replacement and saving the state from the output of the enrollment protocol.

Member Function Documentation

byte [] com.good.daf.app.ChangeDeviceProcessParams.getNewAuthToken ( )
Returns
the last value passed to setNewAuthToken, or the empty bytestring by default
DADevice com.good.daf.app.ChangeDeviceProcessParams.getNewDevice ( )
Returns
the new device to use. null means the native device will be used.
byte [] com.good.daf.app.ChangeDeviceProcessParams.getNewUserString ( )
Returns
the new user string, or null if there is not one
byte [] com.good.daf.app.ChangeDeviceProcessParams.getOldAuthToken ( )
Returns
the last value passed to setOldAuthToken, or the empty bytestring by default
DADevice com.good.daf.app.ChangeDeviceProcessParams.getOldDevice ( )
Returns
the old device to use. null means the native device will be used.
byte [] com.good.daf.app.ChangeDeviceProcessParams.getPassphrase ( )

Gets the pre-collected passphrase.

Returns
the last value given to setPassphrase()
byte [] com.good.daf.app.ChangeDeviceProcessParams.getState ( )
Returns
the state string last passed into setState()
byte [] com.good.daf.app.ChangeDeviceProcessParams.getUserString ( )
Returns
the user string in the current state string, or null if there is not one
void com.good.daf.app.ChangeDeviceProcessParams.setNewAuthToken ( byte[]  token)

Sets the DAF authentication token for use with the new device.

The default authtoken is the empty string.

Parameters
tokenauth token for use with new device
void com.good.daf.app.ChangeDeviceProcessParams.setNewDevice ( DADevice  dev)

The new DADevice to use in the protocol.

This is the device the process will move to.

If this is null, a native device is used as obtained from the native DADriver class.

Parameters
devdevice to use, or null to use the native device
void com.good.daf.app.ChangeDeviceProcessParams.setNewUserString ( byte[]  us)

Sets the new user string, which will be stored after this protocol completes successfully.

If you do not call this method, the user string will keep its old value.

Parameters
usthe new user string value
void com.good.daf.app.ChangeDeviceProcessParams.setOldAuthToken ( byte[]  token)

Sets the DAF authentication token for use with the old device.

The default authtoken is the empty string.

Parameters
tokenauth token for use with old device
void com.good.daf.app.ChangeDeviceProcessParams.setOldDevice ( DADevice  dev)

The old, currently-enrolled DADevice to use in the protocol.

This is the device the process will move from.

If this is null, a native device is used as obtained from the native DADriver class.

Parameters
devdevice to use, or null to use the native device
void com.good.daf.app.ChangeDeviceProcessParams.setPassphrase ( byte[]  pass)

Inputs the pre-collected passphrase.

This is used for the authentication process with the old device.

If you know this process will always require a passphrase, you can collect it from the user before beginning the process and input it here.

This overrides any callback passed to setPassphraseCallback.

Parameters
passpre-collected passphrase
void com.good.daf.app.ChangeDeviceProcessParams.setPassphraseCallback ( PassphraseCallback  pc)

Sets the passphrase collection callback.

See the documentation for PassphraseCallback for the rules surrounding this call.

setPassphrase() overrides this method.

Parameters
pcnew passphrase callback implementor
void com.good.daf.app.ChangeDeviceProcessParams.setState ( byte[]  st)

Set the state string.

This is the result of the last enrollment or passphrase change process with the old device.

This is called for you by DAFApplication.changeDevice().

Parameters
stnew state string
void com.good.daf.app.ChangeDeviceProcessParams.start ( )

Start the device change process.

This call completes quickly; the actual process takes place in a background worker thread. Provide a ProgressCallback if you want to be notified of the worker thread's results.


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