Skip to content

Latest commit

 

History

History
252 lines (144 loc) · 8.87 KB

WardenApi.md

File metadata and controls

252 lines (144 loc) · 8.87 KB

\WardenApi

All URIs are relative to http://localhost

Method HTTP request Description
AddMembersToGroup Post /warden/groups/{id}/members Add members to a group
CreateGroup Post /warden/groups Create a group
DeleteGroup Delete /warden/groups/{id} Delete a group by id
DoesWardenAllowAccessRequest Post /warden/allowed Check if an access request is valid (without providing an access token)
DoesWardenAllowTokenAccessRequest Post /warden/token/allowed Check if an access request is valid (providing an access token)
GetGroup Get /warden/groups/{id} Get a group by id
ListGroups Get /warden/groups List groups
RemoveMembersFromGroup Delete /warden/groups/{id}/members Remove members from a group

AddMembersToGroup

AddMembersToGroup($id, $body)

Add members to a group

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups:<id>\"], \"actions\": [\"members.add\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
id string The id of the group to modify.
body GroupMembers [optional]

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateGroup

Group CreateGroup($body)

Create a group

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups\"], \"actions\": [\"create\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
body Group [optional]

Return type

Group

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteGroup

DeleteGroup($id)

Delete a group by id

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups:<id>\"], \"actions\": [\"delete\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
id string The id of the group to look up.

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DoesWardenAllowAccessRequest

WardenAccessRequestResponse DoesWardenAllowAccessRequest($body)

Check if an access request is valid (without providing an access token)

Checks if a subject (typically a user or a service) is allowed to perform an action on a resource. This endpoint requires a subject, a resource name, an action name and a context. If the subject is not allowed to perform the action on the resource, this endpoint returns a 200 response with { \"allowed\": false}, otherwise { \"allowed\": true } is returned. The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:allowed\"], \"actions\": [\"decide\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
body WardenAccessRequest [optional]

Return type

WardenAccessRequestResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DoesWardenAllowTokenAccessRequest

WardenTokenAccessRequestResponse DoesWardenAllowTokenAccessRequest($body)

Check if an access request is valid (providing an access token)

Checks if a token is valid and if the token subject is allowed to perform an action on a resource. This endpoint requires a token, a scope, a resource name, an action name and a context. If a token is expired/invalid, has not been granted the requested scope or the subject is not allowed to perform the action on the resource, this endpoint returns a 200 response with { \"allowed\": false}. Extra data set through the accessTokenExtra field in the consent flow will be included in the response. The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:token:allowed\"], \"actions\": [\"decide\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
body WardenTokenAccessRequest [optional]

Return type

WardenTokenAccessRequestResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetGroup

Group GetGroup($id)

Get a group by id

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups:<id>\"], \"actions\": [\"create\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
id string The id of the group to look up.

Return type

Group

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListGroups

[]Group ListGroups($member, $limit, $offset)

List groups

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups\"], \"actions\": [\"list\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
member string The id of the member to look up. [optional]
limit int64 The maximum amount of policies returned. [optional]
offset int64 The offset from where to start looking. [optional]

Return type

[]Group

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RemoveMembersFromGroup

RemoveMembersFromGroup($id, $body)

Remove members from a group

The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups:<id>\"], \"actions\": [\"members.remove\"], \"effect\": \"allow\" }

Parameters

Name Type Description Notes
id string The id of the group to modify.
body GroupMembers [optional]

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]