Digital Authentication Framework 4.2.0.30
Public Member Functions | Protected Attributes | Package Functions

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

List of all members.

Public Member Functions

void start ()
 Start the device change process.
void setOldDevice (DADevice dev)
 The old, currently-enrolled DADevice to use in the protocol.
DADevice getOldDevice ()
void setOldAuthToken (byte[] token)
 Sets the DAF authentication token for use with the old device.
byte[] getOldAuthToken ()
void setNewDevice (DADevice dev)
 The new DADevice to use in the protocol.
DADevice getNewDevice ()
void setNewAuthToken (byte[] token)
 Sets the DAF authentication token for use with the new device.
byte[] getNewAuthToken ()
void setState (byte[] st)
 Set the state string.
byte[] getState ()
byte[] getUserString ()
byte[] getNewUserString ()
void setNewUserString (byte[] us)
 Sets the new user string, which will be stored after this protocol completes successfully.
void setPassphrase (byte[] pass)
 Inputs the pre-collected passphrase.
byte[] getPassphrase ()
 Gets the pre-collected passphrase.
void setPassphraseCallback (PassphraseCallback pc)
 Sets the passphrase collection callback.

Protected Attributes

DADevice oldDevice
DADevice newDevice
byte[] state
byte[] passphrase
byte[] oldAuthToken = new byte[] {}
byte[] newAuthToken = new byte[] {}
byte[] newUserString = null
PassphraseCallback passphraseCallback

Package Functions

byte[] requestPassphrase () throws Exception
 Internal: call the passphraseCallback to obtain a passphrase.

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
byte [] com.good.daf.app.ChangeDeviceProcessParams.requestPassphrase ( ) throws Exception [package]

Internal: call the passphraseCallback to obtain a passphrase.

Returns:
the passphrase returned by the callback.
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: