oxd-https-extension API#
Setup Client#
Non-normative example request
POST /setup-client
{
"authorization_redirect_uri": "https://client.example.org/cb", <- REQUIRED
"op_host":"https://<ophostname>" <- OPTIONAL (But if missing, must be present in defaults)
"post_logout_redirect_uri": "https://client.example.org/cb", <- OPTIONAL
"application_type": "web", <- OPTIONAL
"response_types": ["code"], <- OPTIONAL
"grant_types": ["authorization_code", "client_credentials"], <- OPTIONAL
"scope": ["openid"], <- OPTIONAL
"acr_values": ["basic"], <- OPTIONAL
"client_name": "", <- OPTIONAL (But if missing, oxd will generate its own non-human readable name)
"client_jwks_uri": "", <- OPTIONAL
"client_token_endpoint_auth_method": "", <- OPTIONAL
"client_request_uris": [], <- OPTIONAL
"client_frontchannel_logout_uris": [], <- OPTIONAL
"client_sector_identifier_uri": [], <- OPTIONAL
"contacts": ["foo_bar@spam.org"], <- OPTIONAL
"ui_locales": [], <- OPTIONAL
"claims_locales": [], <- OPTIONAL
"claims_redirect_uri": [], <- OPTIONAL
"client_id": "<client id of existing client>", <- OPTIONAL ignores all other parameters and skips new client registration forcing to use existing client (client_secret is required if this parameter is set)
"client_secret": "<client secret of existing client>" <- OPTIONAL must be used together with client_secret.
}
Non-normative example response
{
"status": "ok",
"data": {
"oxd_id": "bcad760f-91ba-46e1-a020-05e4281d91b6", <-- DEPRECATED : additional registered client oxdId which can be used for normal operations (same as returned by register_site command). It is going to be removed in future releases.
"op_host": "https://<op-hostname>",
"client_id": "@!1736.179E.AA60.16B2!0001!8F7C.B9AB!0008!A2BB.9AE6.5F14.B387",
"client_secret": "f436b936-03fc-433f-9772-53c2bc9e1c74",
"client_registration_access_token": "d836df94-44b0-445a-848a-d43189839b17",
"client_registration_client_uri": "https://<op-hostname>/oxauth/restv1/register?client_id=@!1736.179E.AA60.16B2!0001!8F7C.B9AB!0008!A2BB.9AE6.5F14.B387",
"client_id_issued_at": 1501854943,
"client_secret_expires_at": 1501941343
}
}
Get Client Token#
Non-normative example request
POST /get-client-token
{
"op_host" : "https://<op-hostname>", <- REQUIRED
"op_discovery_path":"" <- OPTIONAL
"scope" : ["openid","profile","email","uma_protection"], <- OPTIONAL
"client_id": "@!1736.179E.AA60.16B2!0001!8F7C.B9AB!0008!A2BB.9AE6.5F14.B387", <- REQUIRED
"client_secret": "f436b936-03fc-433f-9772-53c2bc9e1c74" <- REQUIRED
}
Non-normative example response
{
"status": "ok",
"data": {
"scope": "openid profile uma_protection uma_authorization email",
"access_token": "b75434ff-f465-4b70-92e4-b7ba6b6c58f2",
"expires_in": 299,
"refresh_token": null
}
}
Register Site#
Non-normative example request
POST /register-site
Authorization: Bearer b75434ff-f465-4b70-92e4-b7ba6b6c58f2
{
"authorization_redirect_uri": "https://client.example.org/cb", <- REQUIRED
"op_host":"https://<ophostname>" <- OPTIONAL (But if missing, must be present in defaults)
"post_logout_redirect_uri": "https://client.example.org/cb", <- OPTIONAL
"application_type": "web", <- OPTIONAL
"response_types": ["code"], <- OPTIONAL
"grant_types": ["authorization_code"], <- OPTIONAL
"scope": ["openid"], <- OPTIONAL
"acr_values": ["basic"], <- OPTIONAL
"client_name": "", <- OPTIONAL (But if missing, oxd will generate its own non-human readable name)
"client_jwks_uri": "", <- OPTIONAL
"client_token_endpoint_auth_method": "", <- OPTIONAL
"client_request_uris": [], <- OPTIONAL
"client_frontchannel_logout_uris": [], <- OPTIONAL
"client_sector_identifier_uri": [], <- OPTIONAL
"contacts": ["foo_bar@spam.org"], <- OPTIONAL
"ui_locales": [], <- OPTIONAL
"claims_locales": [], <- OPTIONAL
"claims_redirect_uri": [], <- OPTIONAL
"client_id": "<client id of existing client>", <- OPTIONAL ignores all other parameters and skips new client registration forcing to use existing client (client_secret is required if this parameter is set)
"client_secret": "<client secret of existing client>", <- OPTIONAL must be used together with client_secret.
"client_registration_access_token":"<access token of existing client>", <- OPTIONAL must be used together with client_id/client_secret
"client_registration_client_uri":"<uri of existing client>", <- OPTIONAL must be used together with client_id/client_secret
"protection_access_token":"<access token of the client>" <- OPTIONAL for `oxd-server` but REQUIRED for `oxd-https-extension`. You can switch off/on protection by `oxd-server`'s `protect_commands_with_access_token` configuration parameter
}
Non-normative example response
{
"status": "ok",
"data": {
"oxd_id": "bcad760f-91ba-46e1-a020-05e4281d91b6",
"op_host": "https://<op-hostname>"
}
}
Update Site#
Non-normative example request
POST /update-site
Authorization: Bearer b75434ff-f465-4b70-92e4-b7ba6b6c58f2
{
"oxd_id":"6F9619FF-8B86-D011-B42D-00CF4FC964FF", <- REQUIRED
"authorization_redirect_uri": "https://client.example.org/cb", <- OPTIONAL
"post_logout_redirect_uri": "https://client.example.org/cb", <- OPTIONAL
"client_frontchannel_logout_uris":["https://client.example.org/logout"], <- OPTIONAL
"response_type":["code"], <- OPTIONAL
"grant_types":[], <- OPTIONAL
"scope": ["opeind", "profile"], <- OPTIONAL
"acr_values": ["duo"], <- OPTIONAL
"client_name": "", <- OPTIONAL
"client_secret_expires_at":1335205592410, <- OPTIONAL can be used to extends client lifetime (milliseconds since 1970)
"client_jwks_uri": "", <- OPTIONAL
"client_token_endpoint_auth_method": "", <- OPTIONAL
"client_request_uris":[], <- OPTIONAL
"client_sector_identifier_uri":"", <- OPTIONAL
"contacts":["foo_bar@spam.org"], <- OPTIONAL
"ui_locales":[], <- OPTIONAL
"claims_locales":[], <- OPTIONAL
"protection_access_token":"<access token of the client>" <- OPTIONAL for `oxd-server` but REQUIRED for `oxd-https-extension`. You can switch off/on protection by `oxd-server`'s `protect_commands_with_access_token` configuration parameter
}
Non-normative example response
### Get Authorization Url
*Non-normative example request*
*Non-normative example response*
### Get Tokens By Code
*Non-normative example request*
Use the code and state obtained in the previous step to call this API to retrieve tokens.
*Non-normative example response*
### Get User Info
*Non-normative example request*
*Non-normative example response*
### Logout URL
*Non-normative example request*
*Non-normative example response*
### Get Access Token By Refresh Token
*Non-normative example request*
*Non-normative example response*
### UMA RS Protect Resources
It's important to have single http method mentioned only one time within given path in JSON otherwise operation will fail.
*Non-normative example request*
```language-json
POST /uma-rs-protect
Authorization: Bearer b75434ff-f465-4b70-92e4-b7ba6b6c58f2
{
"oxd_id": "bcad760f-91ba-46e1-a020-05e4281d91b6", <- REQUIRED
"resources": [{ <- REQUIRED as parameter here we have protection json that describes resources on RS
"path": "/scim",
"conditions": [{
"httpMethods": ["GET"],
"scopes": ["https://example.com/identity/seam/resource/restv1/scim/vas1"],
"ticketScopes": ["https://example.com/identity/seam/resource/restv1/scim/vas1"]
}]
}]
}
Non-normative example response
{
"status": "ok",
"data": {
"oxd_id": "bcad760f-91ba-46e1-a020-05e4281d91b6"
}
}
UMA RS Check Access#
Non-normative example request
POST /uma-rs-check-access
Authorization: Bearer b75434ff-f465-4b70-92e4-b7ba6b6c58f2
{
"oxd_id": "bcad760f-91ba-46e1-a020-05e4281d91b6", <- REQUIRED
"rpt":"", <- REQUIRED RPT or blank value if absent (not send by RP)
"path":"/scim", <- REQUIRED Path of resource (e.g. http://rs.com/phones), /phones should be passed
"http_method" : "GET" <- REQUIRED Http method of RP request (GET, POST, PUT, DELETE)
}
Non-normative Access Granted example response
{
"status":"ok",
"data":{
"access":"granted"
}
}
Non-normative Access Denied example response
{
"status": "ok",
"data": {
"access": "denied",
"ticket": "e986fd2b-de83-4947-a889-8f63c7c409c0",
"www-authenticate_header": "UMA realm=\"rs\",as_uri=\"https://<op-hostname>\",error=\"insufficient_scope\",ticket=\"e986fd2b-de83-4947-a889-8f63c7c409c0\""
}
}
UMA RP - Get RPT#
Non-normative example request
POST /uma-rp-get-rpt
Authorization: Bearer b75434ff-f465-4b70-92e4-b7ba6b6c58f2
{
"oxd_id":"6F9619FF-8B86-D011-B42D-00CF4FC964FF", <- REQUIRED
"ticket": "016f84e8-f9b9-11e0-bd6f-0021cc6004de", <- REQUIRED
"claim_token": "eyj0f9b9...", <- OPTIONAL
"claim_token_format": "http://openid.net/specs/openid-connect-core-1_0.html#IDToken", <- OPTIONAL but required if claims_token is specified
"pct": "c2F2ZWRjb25zZW50", <- OPTIONAL
"rpt": "SSJHBSUSSJHVhjsgvhsgvshgsv", <- OPTIONAL
"scope":["read"], <- OPTIONAL,
"state": "af0ifjsldkj", <- OPTIONAL state that is returned from uma_rp_get_claims_gathering_url command
"protection_access_token": "ejt3425" <- OPTIONAL, required if oxd-https-extension is used
}
Non-normative example response
{
"status": "ok",
"data": {
"pct": "4f44136f-797d-4b70-aa4a-a4d5f96dad7c_86BA.DB48.64EE.52E2.1E48.828A.C4E6.7C82",
"updated": false,
"access_token": "656b0f54-bf05-4ec8-aa95-b81b7c9bfb7a_1649.62A5.396A.3D67.B24F.74E9.2254.E4EF",
"token_type": "Bearer"
}
}
UMA RP Get Claims Gathering Url#
Non-normative example request
POST /uma-rp-get-claims-gathering-url
Authorization: Bearer b75434ff-f465-4b70-92e4-b7ba6b6c58f2
{
"oxd_id":"bcad760f-91ba-46e1-a020-05e4281d91b6", <- REQUIRED
"ticket": "fba00191-59ab-4ed6-ac99-a786a88a9f40", <- REQUIRED
"claims_redirect_uri":"https://client.example.com/cb" <- REQUIRED
}
Non-normative Success example response
{
"status": "ok",
"data": {
"url": "https://<op-hostname>/oxauth/restv1/uma/gather_claims?client_id@!1736.179E.AA60.16B2!0001!8F7C.B9AB!0008!4508.BF20.9B81.E904&ticket=fba00191-59ab-4ed6-ac99-a786a88a9f40&claims_redirect_uri=https://client.example.com/cb&state=d871gpie16np0f5kfv936sc33k",
"state": "d871gpie16np0f5kfv936sc33k"
}
}
After being redirected to the Claims Gathering URL the user goes through the claims gathering flow. If successful, the user is redirected back to claims_redirect_uri
with a new ticket which should be provided with the next uma_rp_get_rpt
call.
Example of Response:
https://client.example.com/cb?ticket=e8e7bc0b-75de-4939-a9b1-2425dab3d5ec