AttestationChallenge

@Serializable
data class AttestationChallenge(source)

A generic representation of a challenge sent the server.

Constructors

Link copied to clipboard
constructor(issuedAt: Instant, validity: Duration, timeZone: TimeZone? = null, nonce: ByteArray, attestationEndpoint: String, proofOID: ObjectIdentifier, includeGenericDeviceName: Boolean = false, keyConstraints: KeyConstraints? = null)
constructor(issuedAt: Instant, validUntil: Instant, timeZone: TimeZone?, nonce: ByteArray, attestationEndpoint: String, proofOID: ObjectIdentifier, includeGenericDeviceName: Boolean = false, keyConstrains: KeyConstraints? = null)

Convenience constructor to pass two instants instead of instant and duration

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The endpoint to post the CSR containing the attestation proof to

Link copied to clipboard

Whether to include a generic make and model (such as "Google Pixel 8", or "iPhone 16" with the attestation proof). On its own this is not the device's nickname and therefore cannot identify a person in its own. Defaults to false.

Link copied to clipboard

The issuing time of the nonce. Useful to detect clock drifts and exit early. This is not considered sensible information, as clocks must be in sync anyhow.

Link copied to clipboard

Specified key constraints for the client

Link copied to clipboard
@Serializable(with = ByteArrayBase64UrlSerializer::class)
val nonce: ByteArray

The nonce chosen by the server. Must be at most 128 bytes long, as this is the largest nonce size supported by Android.

Link copied to clipboard
@Serializable(with = ObjectIdentifierStringSerializer::class)
val proofOID: ObjectIdentifier

The OID to be used for encoding the attestation proof into the signed CSR used to transfer the proof.

Link copied to clipboard
@Serializable(with = TimeZoneSerializer::class)
val timeZone: TimeZone? = null

The server timezone. Can be omitted if the server does not want to disclose this information

Link copied to clipboard

How long this nonce is considered valid.

Link copied to clipboard

Lazily-evaluated property

Link copied to clipboard
val version: Int? = null

Indicates the wire format version

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getRdnSerialNumber(): AttributeTypeAndValue

Encapsulates the nonce encoded into a KnownOIDs.serialNumber RDN component for easier parsing

Link copied to clipboard
open override fun hashCode(): Int