Client Allowed URI Services - Ulbora/GoAuth2 GitHub Wiki
Add Client Allowed URI (For Super Users only; allowed to add any URI)
Method: POST
URL: http://localhost:3000/rs/clientAllowedUriSuper/add
Request headers Example:
Content-Type = application/json
Authorization = bearer jwttokenFromGoAuth2WithSuperUser
clientId = 10
userId = tester (when using Auth code, Implicit, or Password tokens)
Request Body Example:
{
"uri":"www.ulboralabs.com",
"clientId":616
}
Response:
{
"success": true,
"id": 34
}
Add Client Allowed URI (prohibited from adding some URIs)
Method: POST
URL: http://localhost:3000/rs/clientAllowedUri/add
Request headers Example:
Content-Type = application/json
Authorization = bearer jwttokenFromGoAuth2
clientId = 10
userId = tester (when using Auth code, Implicit, or Password tokens)
Request Body Example:
{
"uri":"www.ulboralabs.com",
"clientId":616
}
Response:
{
"success": true,
"id": 34
}
Update Allowed URI (Super User only; allowed to update any URI)
Method: PUT
URL: http://localhost:3000/rs/clientAllowedUriSuper/update
Request headers Example:
Content-Type = application/json
Authorization = bearer jwttokenFromGoAuth2
clientId = 10
userId = tester (when using Auth code, Implicit, or Password tokens)
Request Body Example:
{
"uri":"www.ulboralabs.com",
"clientId":616
}
Response:
{
"success": true
}
Update Allowed URI (prohibited from updating some URIs)
Method: PUT
URL: http://localhost:3000/rs/clientAllowedUri/update
Request headers Example:
Content-Type = application/json
Authorization = bearer jwttokenFromGoAuth2
clientId = 10
userId = tester (when using Auth code, Implicit, or Password tokens)
Request Body Example:
{
"uri":"www.ulboralabs.com",
"clientId":616
}
Response:
{
"success": true
}
Get Allowed URI
Method: GET
URL: http://localhost:3000/rs/clientAllowedUri/get/510
510 = id
Request headers Example:
Authorization = bearer jwttokenFromGoAuth2
clientId = 10
userId = tester (when using Auth code, Implicit, or Password tokens)
Response:
{
"id": 510,
"uri": "someUri",
"clientId": 10
}
Get Allowed URI List by Client
Method: GET
URL: http://localhost:3000/rs/clientAllowedUri/list/101
101 = clientId
Request headers Example:
Authorization = bearer jwttokenFromGoAuth2
clientId = 10
userId = tester (when using Auth code, Implicit, or Password tokens)
Response:
[
{
"id": 1487,
"uri": "/ulbora/rs/client/add",
"clientId": 101
},
{
"id": 1521,
"uri": "/ulbora/rs/client/update",
"clientId": 101
}
]
Delete Allowed URI
Method: DELETE
URL: http://localhost:3000/rs/clientAllowedUri/delete/510
510 = id
Request headers Example:
Authorization = bearer jwttokenFromGoAuth2
clientId = 10
userId = tester (when using Auth code, Implicit, or Password tokens)
Response:
{
"success": true
}