Configure a claims source
Configures a new claims source for your tenant. When issuing a new credential, MATTR VII will make either a GET or a POST request to the claims source using the configured request parameters and fetch available data. This fetched data can then be included in the issued credential.
Analytic event
- CLAIM_SOURCE_CREATE_START
- CLAIM_SOURCE_CREATE_SUCCESS
- CLAIM_SOURCE_CREATE_FAIL
Roles
/v1/claim-sources
In: header
The claim source payload
Claims source name.
Claims source URL (and any redirects it may include):
- Must be a valid URL.
- Must use the HTTPS protocol.
- Must not be an IP address.
- Must not include query parameters.
- Unicode will be converted to ASCII.
Indicates the request method MATTR VII will use when retrieving data from this claims source. Both the GET and POST method are supported. If no value is provided, GET is used by default.
When using POST, all requestParameters
must be included in the request body in JSON format.
"GET" | "POST"
Use this object to define how to map request parameters that are sent to your claims source using the mapFrom
and defaultValue
properties:
- When only providing
mapFrom
, the request parameter will be mapped from the defined path. If mapping fails, no alternative value is used. You can map data from both theclaims
andcredentialConfiguration
objects. - When providing both
mapFrom
anddefaultValue
, MATTR VII will attempt to map the request parameter from the defined path. If mapping fails, thedefaultValue
is used instead. - When only providing
defaultValue
, its value is used to populate the request parameter, regardless of any available claims values.
Path to map the claim from.
Path to map the claim from.
Static value to be used when mapFrom
fails or evaluated to undefined (attribute doesn't exist).
Empty Object
Static value to be used for all issued credentials, without querying the claims source.
Empty Object
Authentication method configuration to access the claims source.
API Key used to authenticate the request to the claims source server.
"api-key"
API key value. Note that MATTR VII does not validate your input, which means it's up to you to provide the correct API key for your claim sources.
OAuth client credentials used for getting an access token for the claim source.
"oauth-client-credentials"
OAuth 2.0 token endpoint URL for obtaining an access token for this claims source.
url
Your client identifier for this claims source.
OAuth 2.0 client secret that will be used for the token endpoint request.
Two authentication methods are available:
client_secret_basic
(default): Credentials are passed as a base 64 encoded basic token.client_secret_post
: Credentials are passed as parameters within the request body.
"client_secret_basic" | "client_secret_post"
Optional audience for the claims source token.
Response Body
curl -X POST "https://example.vii.au01.mattr.global/v1/claim-sources" \ -H "Content-Type: application/json" \ -d '{ "name": "Claims source accepting a x-api-key header", "url": "https://example.com/api/data", "authorization": { "type": "api-key", "value": "6hrFDATxrG9w14QY9wwnmVhLE0Wg6LIvwOwUaxz761m1J" }, "requestParameters": { "account_type": { "mapFrom": "claims.accountType", "defaultValue": "account.student" }, "account_id": { "mapFrom": "claims.accountId" } } }'
{
"name": "Claims source accepting a x-api-key header",
"url": "https://example.com/api/data",
"authorization": {
"type": "api-key",
"value": "****************************************61m1J"
},
"requestParameters": {
"account_type": {
"mapFrom": "claims.accountType",
"defaultValue": "account.student"
},
"account_id": {
"mapFrom": "claims.accountId"
}
}
}
{
"code": "BadRequest",
"message": "Validation Error",
"details": [
{
"location": "body",
"msg": "Invalid value",
"param": "url"
}
]
}
How would you rate this page?