User Authentication and Notifications
You can extend onboarding so that each managed instance is linked to a user account in your identity provider. Once an instance has a linked user, you can find instances by user and send that user notifications through the Notification Service.
This works the same way for Wallet Provider and Verifier Provider backends.
How it works
The app reads the settings. The provider metadata published by your provider backend includes the
userAuthenticationsettings: identity provider, client ID, and redirect URI.The app registers. Registration returns the instance ID and a
userNonce. The instance status isPENDING.The user signs in. The app authenticates the user with your identity provider.
The app activates. The app calls activate with the user's
userAccessTokenanduserIdToken, along with the app integrity proof.The provider backend validates. It validates the token against your
tokenValidationsettings, verifies the nonce, and stores the user'ssubagainst the managed instance.
If required is true, users must complete authentication to activate
their instance. If false, authentication is optional and the instance
can activate without a linked user.
Configuring user authentication
Add a userAuthentication block to your walletProvider or
verifierProvider configuration. The block is the same for both:
walletProvider: # or verifierProvider
PROCIVIS_ONE:
type: PROCIVIS_ONE
params:
public:
userAuthentication:
required: true
identityProvider: keycloak
clientId: one-wallet
redirectUri: https://wallet.example.com/auth/callback
tokenValidation:
aud: one-wallet
iss: https://keycloak.example.com/realms/one
jwksUri: https://keycloak.example.com/realms/one/protocol/openid-connect/certs
| Parameter | Description |
|---|---|
required | If true, users must authenticate to activate their instance. If false, authentication is optional. |
identityProvider | The identity provider the app authenticates users with. |
clientId | The client ID the app uses with the identity provider. |
redirectUri | The redirect URI for the identity provider's authentication flow. |
tokenValidation.aud | Expected audience of the token. |
tokenValidation.iss | Expected issuer of the token. |
tokenValidation.jwksUri | Where the provider backend fetches the identity provider's signing keys. |
These settings are published to apps through the provider metadata, so
keep them under params.public.
For the full configuration, see Configuring Wallet Provider Backend or Configuring Verifier Provider Backend.
Finding a user's instances
The linked user is returned as userSub in the managed instance list and
detail. To find all instances belonging to a user, filter by it:
GET /api/managed-instance/v1?userSub={sub}
Sending notifications
The Notification Service is a separate service that sends template-based, translation-ready notifications to the users of your managed instances. Specify the recipient, the delivery channel, and the template; the service handles rendering and delivery.
POST /api/notification/v1/wallet-user
{
"channel": "EMAIL",
"user": "user-subject-id",
"template": {
"name": "CREDENTIAL_LOGIN_DEACTIVATED",
"locale": "EN"
}
}
| Field | Description |
|---|---|
channel | Delivery channel. Currently EMAIL. |
user | The user's sub, as stored in userSub on the managed instance. |
template.name | A pre-defined notification event, for example: CREDENTIAL_LOGIN_ACTIVATED, CREDENTIAL_LOGIN_DEACTIVATED, or CREDENTIAL_LOGIN_RESET. The message content is determined entirely by the template and locale. |
template.locale | The language to render the notification in. Currently EN. |
template.data | Reserved for future templates that support dynamic values. Not currently used. |
A successful call returns 204 No Content. There is no delivery
confirmation or status polling.
EUDI Wallet Providers must inform users within 24 hours of revoking their wallet unit. You can reach those users if they have onboarded with user and you have configured the Notification Service. See EUDI Wallet Provider.