Package-level declarations

Types

Link copied to clipboard
typealias ClassifyPurposesFn = (requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, selections: List<List<Int>>) -> Set<PresentmentPurpose>

Function that classifies the PresentmentPurposes for the active selections in presentmentData.

Link copied to clipboard
typealias ClassifyRiskFn = (requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, selections: List<List<Int>>, purposes: Set<PresentmentPurpose>) -> ConsentRiskAssessment

Function that evaluates the ConsentRiskAssessment for the active selections in presentmentData and the classified purposes.

Link copied to clipboard
typealias ClassifySimpleConsentFn = (requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, selections: List<List<Int>>) -> SimpleConsent?

Function that evaluates whether the active selections in presentmentData qualify as a SimpleConsent request, returning null if the full consent prompt should be used.

Link copied to clipboard
data class ConsentRiskAssessment(val level: ConsentRiskLevel, val reasons: Set<ConsentRiskReason> = emptySet())

The evaluated risk level and accompanying reasons for a credential presentment request.

Link copied to clipboard

Risk level evaluated for a credential presentment request to determine the placement and styling of the relying party information box, as well as whether a cool-off timer is enforced on the confirmation button.

Link copied to clipboard

Specific risk reason(s) explaining why a presentment request was classified with a given ConsentRiskLevel.

Link copied to clipboard

High-level, opinionated purpose classification for a credential presentment use-case.

Link copied to clipboard
data class SimpleConsent(val credential: Credential, val selection: PresentmentSelection, val claim: SimpleConsentClaim)

Represents a simple, well-defined, non-PII credential presentment request that can be combined with biometric authentication.

Link copied to clipboard
sealed class SimpleConsentClaim

High-level classification of the specific non-PII claim being requested in a SimpleConsent.

Functions

Link copied to clipboard
fun defaultClassifyPurposes(requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, selections: List<List<Int>> = presentmentData.defaultSelections()): Set<PresentmentPurpose>

Default ClassifyPurposesFn implementation that classifies the PresentmentPurposes across all selected use-cases in presentmentData.

Link copied to clipboard
fun defaultClassifyRisk(requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, selections: List<List<Int>> = presentmentData.defaultSelections(), purposes: Set<PresentmentPurpose> = defaultClassifyPurposes( requester = requester, trustedRequesterIdentity = trustedRequesterIdentity, presentmentData = presentmentData, selections = selections, )): ConsentRiskAssessment

Default ClassifyRiskFn implementation that evaluates the ConsentRiskAssessment for a presentmentData given the trustedRequesterIdentity, the active selections per use-case, and the classified purposes.

Link copied to clipboard
fun defaultClassifySimpleConsent(requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, selections: List<List<Int>> = presentmentData.defaultSelections()): SimpleConsent?

Default ClassifySimpleConsentFn implementation that checks whether a credential presentment request qualifies as a simple, well-defined non-PII request (such as age verification) that can be combined with biometric authentication.