com.mysql.cj.callback

## Class FidoAuthenticationCallback

- java.lang.Object
- - com.mysql.cj.callback.FidoAuthenticationCallback

All Implemented Interfaces:
  MysqlCallback

    public class FidoAuthenticationCallback
    extends Object
    implements MysqlCallback

The callback object used by the authentication plugin AuthenticationFidoClient to exchange authenticator data between the driver and the client application. Applications must implement a MysqlCallbackHandler to manage the interaction with authenticator devices and provide the data required to proceed with FIDO authentication. Such handler receives an instance of this class, which must then be used to obtain the data to send to the device and to submit the produced authenticator data and signature into the driver.

### Field Summary

Fields
`private byte[]` `authenticatorData`
`private byte[]` `credentialId`
`private String` `relyingPartyId`
`private byte[]` `scramble`
`private byte[]` `signature`

### Constructor Summary

Constructors
Constructor and Description
`FidoAuthenticationCallback(byte[] scramble, String relyingPartyId, byte[] credentialId)` Instances of this object are used to exchange FIDO data between the client application and the driver and is responsible for managing all the interactions with the FIDO authenticator devices.

### Method Summary

All Methods Instance Methods Concrete Methods
`byte[]` `getAuthenticatorData()` Returns the FIDO Authenticator Data produced by the authenticator interaction.
`byte[]` `getCredentialId()` Returns the FIDO Credential ID for the coming authenticator interaction.
`String` `getRelyingPartyId()` Returns the FIDO Relying Party ID for the coming authenticator interaction.
`byte[]` `getScramble()` Returns the FIDO Client Data Hash (scramble) for the coming authenticator interaction.
`byte[]` `getSignature()` Returns the FIDO Signature produced by the authenticator interaction
`void` `setAuthenticatorData(byte[] authenticatorData)` Sets the FIDO Authenticator Data produced by the authenticator interaction.
`void` `setSignature(byte[] signature)` Sets the FIDO Signature produced by the authenticator interaction.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### scramble

    private byte[] scramble

#### relyingPartyId

    private String relyingPartyId

#### credentialId

    private byte[] credentialId

#### authenticatorData

    private byte[] authenticatorData

#### signature

    private byte[] signature

### Constructor Detail

#### FidoAuthenticationCallback

    public FidoAuthenticationCallback(byte[] scramble,
                                      String relyingPartyId,
                                      byte[] credentialId)

Instances of this object are used to exchange FIDO data between the client application and the driver and is responsible for managing all the interactions with the FIDO authenticator devices.

Parameters:
  `scramble` - the scramble
  `relyingPartyId` - the relying party id
  `credentialId` - the credential id

### Method Detail

#### getScramble

    public byte[] getScramble()

Returns the FIDO Client Data Hash (scramble) for the coming authenticator interaction.

Returns:
  the scramble

#### getRelyingPartyId

    public String getRelyingPartyId()

Returns the FIDO Relying Party ID for the coming authenticator interaction.

Returns:
  the relying party id

#### getCredentialId

    public byte[] getCredentialId()

Returns the FIDO Credential ID for the coming authenticator interaction.

Returns:
  the credential id

#### setAuthenticatorData

    public void setAuthenticatorData(byte[] authenticatorData)

Sets the FIDO Authenticator Data produced by the authenticator interaction.

Parameters:
  `authenticatorData` - the authenticator data

#### getAuthenticatorData

    public byte[] getAuthenticatorData()

Returns the FIDO Authenticator Data produced by the authenticator interaction.

Returns:
  the authenticator data

#### setSignature

    public void setSignature(byte[] signature)

Sets the FIDO Signature produced by the authenticator interaction.

Parameters:
  `signature` - the signature

#### getSignature

    public byte[] getSignature()

Returns the FIDO Signature produced by the authenticator interaction

Returns:
  the signature

Copyright © 2016, 2024, Oracle and/or its affiliates.