# OpenId4VpRegistry

Artifact: [androidx.credentials.registry:registry-digitalcredentials-openid](https://developer.android.com/jetpack/androidx/releases/credentials-registry) [View Source](https://cs.android.com/search?q=file:androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry.kt+class:androidx.credentials.registry.digitalcredentials.openid4vp.OpenId4VpRegistry) Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

*** ** * ** ***

<br />

```
class OpenId4VpRegistry : DigitalCredentialRegistry
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.credentials.registry.provider.RegisterCredentialsRequest](https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest) |||
|   | ↳ | [androidx.credentials.registry.provider.digitalcredentials.DigitalCredentialRegistry](https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/digitalcredentials/DigitalCredentialRegistry) ||
|   |   | ↳ | [androidx.credentials.registry.digitalcredentials.openid4vp.OpenId4VpRegistry](https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry) |

*** ** * ** ***

A registration request containing data that can serve the [OpenID for Verifiable Presentations protocol](https://openid.net/specs/openid-4-verifiable-presentations-1_0.html) based request.

The (`https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#type()`, `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#(kotlin.collections.List,kotlin.String,kotlin.String,kotlin.collections.List,kotlin.collections.List)`) properties together act as a primary key for this registry record stored with the Registry Manager. You later can use the same values of `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#type()` + `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#(kotlin.collections.List,kotlin.String,kotlin.String,kotlin.collections.List,kotlin.collections.List)` to overwrite or delete a previously registered registry. Therefore, you should track the ids you use for various registry use cases (most often you only need one) so that you can later use them to update the same registry record.

If both `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#(kotlin.collections.List,kotlin.String,kotlin.String,kotlin.collections.List,kotlin.collections.List)` and `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#(kotlin.collections.List,kotlin.String,kotlin.String,kotlin.collections.List,kotlin.collections.List)` are empty, the registry will never be used to answer a request.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#(kotlin.collections.List,kotlin.String,kotlin.String,kotlin.collections.List,kotlin.collections.List)` or `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#(kotlin.collections.List,kotlin.String,kotlin.String,kotlin.collections.List,kotlin.collections.List)` length is greater than 64 characters |

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_MULTISIGNED()` OpenID4VP 1.0 multi-signed protocol identifier. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_SIGNED()` OpenID4VP 1.0 signed protocol identifier. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_UNSIGNED()` OpenID4VP 1.0 unsigned protocol identifier. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#OpenId4VpRegistry(kotlin.collections.List,kotlin.String,kotlin.String,kotlin.collections.List,kotlin.collections.List)( credentialEntries: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/digitalcredentials/DigitalCredentialEntry>, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, intentAction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, inlineIssuanceEntries: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/digitalcredentials/InlineIssuanceEntry>, supportedProtocols: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html> )` |

### Inherited properties

From [androidx.credentials.registry.provider.RegisterCredentialsRequest](https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html` `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#credentials()`

the credentials to register
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#id()`

the unique id that identifies this registry, such that it won't be overwritten by other different registries of the same `type`
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#intentAction()`

the intent action that will be used to launch your fulfillment activity when one of your credentials was chosen by the user, default to `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#ACTION_GET_CREDENTIAL()` when unspecified; when Credential Manager launches your fulfillment activity, it will build an intent with the given `intentAction` targeting your package, so this is useful when you need to define different fulfillment activities for different registries
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html` `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#matcher()`

the matcher wasm binary in bytes; the matcher will be interpreted and run in a safe and privacy-preserving sandbox upon an incoming request and it should output the qualified credentials given the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#credentials()` and the request; an invalid matcher (e.g. one that fails wasm interpretation or causes exceptions) will mean that your credentials will never be surfaced to the user
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#type()`

the type of the credentials being registered; this matches the `https://developer.android.com/reference/kotlin/androidx/credentials/Credential#type()` that these registered credentials will be returned as

## Constants

### PROTOCOL_OPENID4VP_1_0_MULTISIGNED

```
const val PROTOCOL_OPENID4VP_1_0_MULTISIGNED: String
```

OpenID4VP 1.0 multi-signed protocol identifier.

### PROTOCOL_OPENID4VP_1_0_SIGNED

```
const val PROTOCOL_OPENID4VP_1_0_SIGNED: String
```

OpenID4VP 1.0 signed protocol identifier.

### PROTOCOL_OPENID4VP_1_0_UNSIGNED

```
const val PROTOCOL_OPENID4VP_1_0_UNSIGNED: String
```

OpenID4VP 1.0 unsigned protocol identifier.

## Public constructors

### OpenId4VpRegistry

```
OpenId4VpRegistry(
    credentialEntries: List<DigitalCredentialEntry>,
    id: String,
    intentAction: String = RegistryManager.ACTION_GET_CREDENTIAL,
    inlineIssuanceEntries: List<InlineIssuanceEntry> = emptyList(),
    supportedProtocols: List<String> = listOf(
            PROTOCOL_OPENID4VP_1_0_SIGNED,
            PROTOCOL_OPENID4VP_1_0_UNSIGNED,
            PROTOCOL_OPENID4VP_1_0_MULTISIGNED,
        )
)
```

| Parameters |
|---|---|
| `credentialEntries: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/digitalcredentials/DigitalCredentialEntry>` | the list of entries to register |
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the unique id for this registry |
| `intentAction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html = RegistryManager.ACTION_GET_CREDENTIAL` | the intent action that will be used to launch your fulfillment activity when one of your credentials was chosen by the user, default to `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#ACTION_GET_CREDENTIAL()` when unspecified; when Credential Manager launches your fulfillment activity, it will build an intent with the given `intentAction` targeting your package, so this is useful when you need to define different fulfillment activities for different registries |
| `inlineIssuanceEntries: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/digitalcredentials/InlineIssuanceEntry> = emptyList()` | the list of inline issuance entries to add the user credentials on the fly, if applicable |
| `supportedProtocols: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html> = listOf( PROTOCOL_OPENID4VP_1_0_SIGNED, PROTOCOL_OPENID4VP_1_0_UNSIGNED, PROTOCOL_OPENID4VP_1_0_MULTISIGNED, )` | an ordered list of `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry.OpenId4VpProtocol` identifiers that your registry supports, in descending order of preference (highest priority first). When an incoming OpenID4VP request is received, the system evaluates it against each protocol in this list sequentially, stopping immediately on the first successful match. Any protocol not included in this list is strictly ignored. Defaults to `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_SIGNED()`, `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_UNSIGNED()`, and `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_MULTISIGNED()` |