Skip to main content

Enroll a Data Source as an RS

Once a data source is registered, it must be configured with at least one system role in order to be shown to a user. With the exception of an Identity Provider (IDP), the enrollment is made against a specific Authorization Server. The Authorization Server should have a reciprocal Resource Server enrollment.

note

Enrolling a data source as an Identity Provider (IDP) happens only at the Wallet level. Identity Providers do not connect in any way with the Authorization Server. If an enrolled Resource Server is being used, it first needs to exist within the Authorization Server. Steps for this enrollment are documented on the Configuring a Resource Server via API page.

Sample Requests

Enroll a Data Source as an RS

curl -X PATCH '{{WS_ADMIN_URI}}' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
--data-raw '[
{
"op": "add",
"path": "/enrolled-rs",
"value": {
"type": "enrolled-rs",
"id": 1,
"attributes": {
"enrolledIdentifier": "fpx-alpha",
"disabled": null
},
"relationships": {
"authorizationServer": {
"data": {
"type": "authorization-server",
"id": 1
}
},
"dataSource": {
"data": {
"type": "data-source",
"id": 1
}
}
}
}
},
{
"op": "add",
"path": "/oauth-provider/2/customScopes",
"value": {
"type": "oauth-provider-custom-scopes",
"id": 1,
"attributes": {
"scopes": "fpx_rot openid"
}
}
}
]'

Get information about a Data Source that is enrolled as a Resource Server

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

Update a Resource Server entry

curl -X PATCH '{{WS_ADMIN_URI}}' \
--header 'Content-Type: application/vnd.api+json; ext=jsonpatch' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
--data-raw '[
{
"op": "replace",
"path": "/enrolled-rs/1",
"value": {
"type": "enrolled-rs",
"id": 1,
"attributes": {
"enrolledIdentifier": "fpx-beta",
"disabled": null
},
"relationships": {
"authorizationServer": {
"data": {
"type": "authorization-server",
"id": 1
}
},
"dataSource": {
"data": {
"type": "data-source",
"id": 1
}
}
}
}
},
{
"op": "replace",
"path": "/oauth-provider-custom-scopes/1",
"value": {
"type": "oauth-provider-custom-scopes",
"id": 1,
"attributes": {
"scopes": "fpx_rot openid newscope"
}
}
}
]'

Verify at the Application API: https://WALLET_BASE_URL/registry/data-sources/RS

Request Attributes

ParameterDescriptionExample valueRequiredLocalizable
enrolledIdentifierA unique identifier for the Resource Serverfpx-alphaYesNo
disabledWhether this Resource Server is disabled at the WalletnullNoNo
RelationshipDescriptionRequired
dataSourceThe Data Source to be enrolled as a Resource Server. See the example request above.Yes