Enroll a Data Source as an IDP
An Identity Provider can be used for login, but does not play a role in the FPX ecosystem.
Request Attributes
Parameter | Description | Example value | Required | Localizable |
---|---|---|---|---|
name | A human-readable name for the Identity Provider | FPX-Alpha | No | Yes |
identifier | A unique identifier for the Identity Provider | fpx-alpha | Yes | No |
logoUrl | A URL to fetch a logo image from | https://icons.iconarchive.com/icons/icons8/ios7/256/Science-Alpha-icon.png | No | Yes |
styleColor | A background color in the Wallet UI | #FFFFFF | No | Yes |
styleFontColor | Font color in the Wallet UI | #000000 | No | Yes |
additionalQueryParams | Additional parameters to include in queries | {} | No | No |
Relationship | Description | Required |
---|---|---|
dataSource | The Data Source to be enrolled as an IDP. See the example request above. | Yes |
Sample Requests
Enroll a Data Source as an Identity Provider (IDP)
curl -X POST '{{WS_ADMIN_URI}}/idp-authenticator' \
--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": "idp-authenticator",
"id": 1,
"attributes": {
"name": "FPX-Alpha",
"identifier": "fpx-alpha",
"logoUrl": "https://icons.iconarchive.com/icons/icons8/ios7/256/Science-Alpha-icon.png",
"styleColor": "#FFFFFF",
"styleFontColor": "#000000",
"additionalQueryParams": {}
},
"relationships": {
"dataSource": {
"data": {
"type": "data-source",
"id": 1
}
}
}
}
}'
View a Data Source enrolled as an IDP
curl -X GET '{{WS_ADMIN_URI}}/idp-authenticator/1' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en'
Update an IDP entry
curl -X PATCH '{{WS_ADMIN_URI}}/idp-authenticator/1' \
--header 'Content-Type: application/vnd.api+json; ext=jsonpatchis' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
--data-raw '{
"data": {
"type": "idp-authenticator",
"id": 1,
"attributes": {
"name": "FPX-Beta",
"identifier": "fpx-beta",
"logoUrl": "https://icons.iconarchive.com/icons/icons8/ios7/256/Science-Beta-icon.png",
"styleColor": "#FFFFFF",
"styleFontColor": "#000000"
},
"relationships": {
"dataSource": {
"data": {
"type": "data-source",
"id": 1
}
}
}
}
}'
Verify at the Application API: https://WALLET_BASE_URL/registry/data-sources/AUTH
There is a second API where this should be reflected: https://WALLET_BASE_URL/login/idps
note
For details on how to add localization options for an Identity Provider, refer to the Localization for the Wallet Server API chapter.