Skip to main content

Enrolling a Client at a Wallet

The Authorization Server (AS) maintains a registry of approved service providers (https://AS_BASE_URL/registry/client). When the AS forwards authorization requests to the Wallet, it will include the client identifier included at this API (identifier). This key allows the Wallet to display the correct client information to the user.

Important

Although the Client is registered with specific request capabilities at the AS, this information is not currently duplicated at the Wallet. The Wallet trusts the AS will only forward valid Client Authorization Requests.

Important

For fields like consentTitleHtml where custom HTML can be provided, how the Wallet Client renders the HTML is up to the implementor. This means that any styling included must be interpreted by the Wallet Client. Also, ensure that the HTML provided is accurate and safe, because it will be returned as-is.

Request Attributes

ParameterDescriptionExample valueRequiredLocalizable
identifierAn identifier for the Enrolled ClientfpxspYesNo
spNameA human-readable name for the Enrolled ClientFPX Service ProviderYesYes
policyUriA URI to find information about client policyhttp://localhostYesYes
iconUriA URI to fetch an icon image for the Enrolled Clienthttp://localhostYesYes
tosUriA URI to find terms of service for the Enrolled Clienthttp://localhostYesYes
consentTitleHtmlHtml that can be rendered by a Wallet client on the Service Provider consent page, to provide a custom title specific to this Service Provider.<h1>An example title without styling</h1>NoYes
consentSubtitleHtmlHtml that can be rendered by a Wallet client on the Service Provider consent page, to provide a custom subtitle specific to this Service Provider.<h2 style='font-size: 40px; color: #000; margin-bottom: 24px;'>Lorem Ipsum is simply dummy text of the <strong style='color: red;'>printing and typesetting</strong> industry.</h2>NoYes
consentFooterHtmlHtml that can be rendered by a Wallet client on the Service Provider consent page, to provide a custom footer specific to this Service Provider.<footer style='font-size: 40px; color: #000; margin-bottom: 24px;'>Lorem Ipsum is simply dummy text of the <strong style='color: red;'>printing and typesetting</strong> industry.</footer>NoYes
RelationshipDescriptionRequired
organizationThe organization to which this Enrolled Client belongs. See the example request above.Yes

Sample Requests

Enroll a Client

curl -X POST '{{WS_ADMIN_URI}}/authorization-server/1/enrolledClients' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
--data-raw '{
"data": {
"type": "enrolled-client",
"id": 1,
"attributes": {
"identifier": "fpxsp",
"spName": "FPX Service Provider",
"policyUri": "http://localhost",
"iconUri": "http://localhost",
"tosUri": "http://localhost",
"consentTitleHtml": "<h1 style='font-size: 40px; color: #000; margin-bottom: 24px;'>Lorem Ipsum is simply dummy text of the <strong style='color: red;'>printing and typesetting</strong> industry.</h1>",
"consentSubtitleHtml": "<h2 style='font-size: 24px; color: blue; margin-bottom: 24px'>Lorem Ipsum is simply dummy text of the <span style='color: orange; font-size: 16px;'>printing and typesetting</span> industry. Lorem Ipsum is simply dummy text of the industry</h2>",
"consentFooterHtml": "<footer style='margin-top: 24px; display: inline-block; font-size: 18px;'>This is a random text for<a style='font-weight: bold; color: green;' href='https://www.google.com' target='_blank'>Terms</a> & <a style='font-weight: bold; color: green;' href='https://www.yahoo.com' target='_blank'>Privacy</a></footer>"
},
"relationships": {
"organization": {
"data": {
"type": "organization",
"id": 1
}
}
}
}
}'

Get information about an Enrolled Client

curl -X POST '{{WS_ADMIN_URI}}/authorization-server/1/enrolledClients/1' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en'

Update an Enrolled Client

curl -X PATCH '{{WS_ADMIN_URI}}/authorization-server/1/enrolledClients/1' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
--data-raw '{
"data": {
"type": "enrolled-client",
"id": 1,
"attributes": {
"identifier": "fpxsp2",
"spName": "FPX Service Provider2",
"policyUri": "http://localhost",
"iconUri": "http://localhost",
"tosUri": "http://localhost"
},
"relationships": {
"organization": {
"data": {
"type": "organization",
"id": 1
}
}
}
}
}'

Verify using the Wallet Application API: https://WALLET_BASE_URL/registry/clients

note

For details on how to add localization options for an Enrolled Client, refer to the Localization for the Wallet Server API chapter.