REST
GET /rest/modules/oauthv2/setups/<setup>/persisted-consent
Path parameter
- None
Query parameter
lang (optional); string: This parameter is used for the localization of text messages in the service response. Examples: EN, DE, IT, FR
user (optional); string: If defined, the persisted consents of the according user are returned as list. Without this parameter, all persisted consents of the according setup are returned (only possible as admin).
Authorization
- Admin or user associated with the persisted consent.
Request body
- None (GET request)
Returns
- 200 OK
- 404 SETUP_NOT_FOUND
- 403 AUTHORIZATION_FAILURE
See the samples below for the structure of the JSON responses.
Errors
- None
Sample (JSON)
- Request:
GET /rest/modules/oauthv2/setups/<setup>/persisted-consent
Accept: application/json
- Response:
200 OK
Content-Type: application/json
{
"Client":[
{
"id": "Client_13df4ff4cc931bdee9499cc23a8d91a3",
"owner": "1000",
"name": "c",
"link": "/nevismeta/rest/modules/oauthv2/setups/Setup_467af528be953afcf05d6d1e2a0c429c/entities/Client_13df4ff4cc931bdee9499cc23a8d91a3",
"valid_from": "2016-01-18T11:04:15.046+01:00",
"client_id": "ba075e14e7f416b4bfd42ec33358b80c",
"default_max_age": -1,
"confidentiality_type": "public",
"require_auth_time": false,
"redirect_uris": [],
"response_types": [],
"grant_types": [
"refresh_token"
],
"scopes": [
{
"resource_id": "ResourceServer_0c39acd19c3c40a0164bfc32c10b5165",
"resource_name": "r",
"value": "scope-a"
}
],
"contacts": []
}
],
"PersistedConsent": [
{
"user": "user-b",
"issue_date": "2016-01-18T11:30:54.123+01:00",
"expiration": "2017-01-12T11:30:54.123+01:00",
"client_id": "ba075e14e7f416b4bfd42ec33358b80c",
"entity_id": "Client_13df4ff4cc931bdee9499cc23a8d91a3",
"scopes": [
"scope-a"
]
}
],
"ResourceServer": [
{
"id": "ResourceServer_0c39acd19c3c40a0164bfc32c10b5165",
"owner": "1000",
"link": "/nevismeta/rest/modules/oauthv2/setups/Setup_467af528be953afcf05d6d1e2a0c429c/entities/ResourceServer_0c39acd19c3c40a0164bfc32c10b5165",
"valid_from": "2016-01-18T10:53:00.880+01:00",
"url": "",
"scope": [
{
"authorization_grant_policy": "consent_persisted",
"value": "scope-a"
}
]
}
]
}
DELETE /rest/modules/oauthv2/setups/<setup>/entities/<entity>/persisted-consent
Path parameter
- None
Query parameter
- user (optional); string: If defined, the persisted consent and the refresh tokens of the according user get revoked. Without this parameter, all persisted consents of the according entity get revoked (only possible as admin).
Authorization
- Admin or user associated with the persisted consent.
Request body
- None (DELETE request)
Returns
- 204 NO CONTENT
- 404 MODULE_NOT_FOUND
- 404 SETUP_NOT_FOUND
- 403 AUTHORIZATION_FAILURE
Errors
- None
Sample (JSON)
- Request:
DELETE /rest/modules/oauthv2/setups/<setup>/entities/<entity>/persisted-consent`
Accept: application/json
- Response:
204 NO CONTENT[
Content-Type: application/json