Skip to main content

Configuring a Data Source

A Data Source represents any OAuth provider to the Wallet. Although, the OAuth connection is unique, the entity may perform multiples roles within the FPX ecosystem, including different capabilities at different Authorization Servers. These roles include:

  1. Identity Providers used only for local (Wallet) authentication
  2. Resource Servers that can be put under management

Sample Requests

Configure a new Data Source

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": "add",
"path": "/oauth-provider",
"value": {
"type": "oauth-provider",
"id": 2,
"attributes": {
"name": "FPX-Alpha",
"clientId": "idstore-wallet",
"clientSecret": "08d6e1f8-d771-4575-ba69-e38f6f0a2511",
"issuerUri": "https://fpxrs-alpha.rs.dev.identos.ca",
"clientAuthenticationMethod": null,
"additionalRequestParams": {}
}
}
},
{
"op": "add",
"path": "oauth-provider/2/dataSource",
"value": {
"type": "data-source",
"id": 1,
"attributes": {
"logoUrl": "https://icons.iconarchive.com/icons/icons8/ios7/256/Science-Alpha-icon.png",
"styleColor": "#FFFFFF",
"styleFontColor": "#000000"
},
"relationships": {
"organization": {
"data": {
"type": "organization",
"id": 1
}
}
}
}
}
]'

Get information about a Data Source

curl -X GET {{WS_ADMIN_URI}}/data-source/1' \
--header 'Content-Type: application/vnd.api+json; ext=jsonpatch' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en'

Update a Data Source

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": "/oauth-provider/2",
"value": {
"type": "oauth-provider",
"id": 2,
"attributes": {
"name": "FPX-Beta",
"clientId": "idstore-wallet",
"clientSecret": "08d6e1f8-d771-4575-ba69-e38f6f0a2511",
"issuerUri": "https://fpxrs-beta.rs.dev.identos.ca",
"clientAuthenticationMethod": null,
"additionalRequestParams": {}
}
}
},
{
"op": "replace",
"path": "/oauth-provider/2/dataSource/1",
"value": {
"type": "data-source",
"id": 1,
"attributes": {
"logoUrl": "https://icons.iconarchive.com/icons/icons8/ios7/256/Science-Beta-icon.png",
"styleColor": "#FFFFFF",
"styleFontColor": "#000000"
},
"relationships": {
"organization": {
"data": {
"type": "organization",
"id": 1
}
}
}
}
}
]'

Request Attributes

The API call shown above to create a Data Source entry also includes the creation of another entity that the Data Source depends on: OAuth Provider. The attributes in this request are described below according to the entity to which they belong.

OAuth Provider

ParameterDescriptionExample valueRequiredLocalizable
nameA human-readable name for the OAuth ProviderFPX-AlphaYesYes
clientIdThis value is used to identify the Wallet Server with the OAuth Provideridstore-walletYesNo
clientSecretA secret the Wallet Server uses with the OAuth Provider08d6e1f8-d771-4575-ba69-e38f6f0a2511YesNo
issuerUriThe base URL of the OAuth Providerhttps://fpxrs-alpha.rs.dev.identos.caYesNo
clientAuthenticationMethodThe authentication method the Wallet Server uses with the OAuth Provider. If left null, defaults to CLIENT_SECRET_BASIC. Currently the following values are supported:
- client_secret_basic
- client_secret_post
- client_secret_jwt
- private_key_jwt
private_key_jwtNoNo
additionalRequestParamsAdditional parameters to include in requests to the OAuth Provider{}NoNo

Data Source

ParameterDescriptionExample valueRequiredLocalizable
logoUrlA URL to fetch a logo image fromhttps://icons.iconarchive.com/icons/icons8/ios7/256/Science-Beta-icon.pngYesYes
styleColorA background color in the Wallet UI#FFFFFFYesYes
styleFontColorFont color in the Wallet UI#000000YesYes
RelationshipDescriptionRequired
organizationThe organization to which the Data Source belongs. See the example request above.Yes

For details on how to add localization options for a Data Source, refer to the Localization for the Wallet Server API chapter.