# 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 />

```
public final class OpenId4VpRegistry extends DigitalCredentialRegistry
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.credentials.registry.provider.RegisterCredentialsRequest](https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCredentialsRequest) |||
|   | ↳ | [androidx.credentials.registry.provider.digitalcredentials.DigitalCredentialRegistry](https://developer.android.com/reference/androidx/credentials/registry/provider/digitalcredentials/DigitalCredentialRegistry) ||
|   |   | ↳ | [androidx.credentials.registry.digitalcredentials.openid4vp.OpenId4VpRegistry](https://developer.android.com/reference/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/androidx/credentials/registry/provider/RegisterCredentialsRequest#type()`, `https://developer.android.com/reference/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/androidx/credentials/registry/provider/RegisterCredentialsRequest#type()` + `https://developer.android.com/reference/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/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/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/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/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 |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_MULTISIGNED()` OpenID4VP 1.0 multi-signed protocol identifier. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_SIGNED()` OpenID4VP 1.0 signed protocol identifier. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_UNSIGNED()` OpenID4VP 1.0 unsigned protocol identifier. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#OpenId4VpRegistry(kotlin.collections.List,kotlin.String,kotlin.String,kotlin.collections.List,kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/registry/provider/digitalcredentials/DigitalCredentialEntry> credentialEntries, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html intentAction, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/registry/provider/digitalcredentials/InlineIssuanceEntry> inlineIssuanceEntries, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> supportedProtocols )` |

### Inherited methods

From [androidx.credentials.registry.provider.RegisterCredentialsRequest](https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCredentialsRequest) `final @https://developer.android.com/reference/androidx/annotation/NonNull byte[]` `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCredentialsRequest#getCredentials()()`

the credentials to register
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCredentialsRequest#getId()()`

the unique id that identifies this registry, such that it won't be overwritten by other different registries of the same `type`
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCredentialsRequest#getIntentAction()()`

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/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
`final @https://developer.android.com/reference/androidx/annotation/NonNull byte[]` `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCredentialsRequest#getMatcher()()`

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/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
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCredentialsRequest#getType()()`

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

## Constants

### PROTOCOL_OPENID4VP_1_0_MULTISIGNED

```
public static final @NonNull String PROTOCOL_OPENID4VP_1_0_MULTISIGNED
```

OpenID4VP 1.0 multi-signed protocol identifier.

### PROTOCOL_OPENID4VP_1_0_SIGNED

```
public static final @NonNull String PROTOCOL_OPENID4VP_1_0_SIGNED
```

OpenID4VP 1.0 signed protocol identifier.

### PROTOCOL_OPENID4VP_1_0_UNSIGNED

```
public static final @NonNull String PROTOCOL_OPENID4VP_1_0_UNSIGNED
```

OpenID4VP 1.0 unsigned protocol identifier.

## Public constructors

### OpenId4VpRegistry

```
public OpenId4VpRegistry(
    @NonNull List<@NonNull DigitalCredentialEntry> credentialEntries,
    @NonNull String id,
    @NonNull String intentAction,
    @NonNull List<@NonNull InlineIssuanceEntry> inlineIssuanceEntries,
    @NonNull List<@NonNull String> supportedProtocols
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/registry/provider/digitalcredentials/DigitalCredentialEntry> credentialEntries` | the list of entries to register |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id` | the unique id for this registry |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html 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/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://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/registry/provider/digitalcredentials/InlineIssuanceEntry> inlineIssuanceEntries` | the list of inline issuance entries to add the user credentials on the fly, if applicable |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> supportedProtocols` | an ordered list of `https://developer.android.com/reference/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/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_SIGNED()`, `https://developer.android.com/reference/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_UNSIGNED()`, and `https://developer.android.com/reference/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry#PROTOCOL_OPENID4VP_1_0_MULTISIGNED()` |