OAuth Authorizations
Summary
The OAuth Authorizations REST API allows resource owners and admins access information regarding OAuth Authorizations given by a resource owner
Description
With the OAuth Authorizations REST API, a resource owner can see his/her Authorizations. A resource owner also has the ability to revoke authorizations.There is also the option for an authorized user to view and modify authorizations for given clients and resource owners.
Resources
| Resource | Since Version | Description |
|---|---|---|
| GET /api/portal/v1.3/authorizations | Retrieve all stored OAuth Authorizations for the logged in user. | |
| DELETE /api/portal/v1.3/authorizations/owner/{subjectid}/application/{appid} | none | |
| DELETE /api/portal/v1.3/authorizations/{authzid} | Delete the OAuth Authorization for the given authorization id. |
GET /api/portal/v1.3/authorizations
Summary
Retrieve all stored OAuth Authorizations for the logged in user.
Description
If user is a member of the admin group then all authorizations are returned. If not, then the logged in user's authorizations are returned.
Parameters
none
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 403 | Forbidden |
| 500 | Internal Server Error |
Returns Array
[ Authorization ]
Example
GET https://localhost:8075/api/portal/v1.3/authorizations
ResponseHTTP 1.1 200 OK
[ {
"scopes" : [ "openid", "resource.WRITE" ],
"created" : 1413973294521,
"applicationID" : "4e8634ba-6762-45ca-bbe5-7ca4e99192ac",
"subject" : "sampleuser",
"id" : "c4ce6c02-44d9-4534-8c2f-854628dd1b87"
}, {
"scopes" : [ "openid", "resource.WRITE" ],
"created" : 1413991466280,
"applicationID" : "4e8634ba-6762-45ca-bbe5-7ca4e99192ac",
"subject" : "regadmin",
"id" : "9b46e3dc-28de-473f-9724-a672303d8a1d"
} ]
DELETE /api/portal/v1.3/authorizations/owner/{subjectid}/application/{appid}
Summary
none
Description
none
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
subjectid |
String | path | Required | ||
appid |
String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|
DELETE /api/portal/v1.3/authorizations/{authzid}
Summary
Delete the OAuth Authorization for the given authorization id.
Description
Admin or Resource Owner task to delete the given authorization id.
Parameters
| Parameter | Description | Data Type | Location | Required | Multiple |
|---|---|---|---|---|---|
authzid |
String | path | Required |
Status Codes
| HTTP Status Code | Reason |
|---|---|
| 204 | No Content |
| 400 | Bad Request |
| 403 | Forbidden |
| 500 | Internal Server Error |