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.
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.
Request Attributes
Parameter | Description | Example value | Required | Localizable |
---|---|---|---|---|
identifier | An identifier for the Enrolled Client | fpxsp | Yes | No |
spName | A human-readable name for the Enrolled Client | FPX Service Provider | Yes | Yes |
policyUri | A URI to find information about client policy | http://localhost | Yes | Yes |
iconUri | A URI to fetch an icon image for the Enrolled Client | http://localhost | Yes | Yes |
tosUri | A URI to find terms of service for the Enrolled Client | http://localhost | Yes | Yes |
Relationship | Description | Required |
---|---|---|
organization | The 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"
},
"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
For details on how to add localization options for an Enrolled Client, refer to the Localization for the Wallet Server API chapter.