Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Clients

michael.vidal edited this page Jun 19, 2017 · 2 revisions

Clients

Get

This method will allow client applications to retrieve a list of Clients that the authorization service knows about.

GET /clients/
GET /clients/{clientid}

Parameters

Name Location Type Description
clientid path Guid the unique identifier for the client

Authorization

The GET /clients/ request requires the authorization with the following scopes:

  • fabric/authorization.manageclients
  • fabric/authorization.read

The GET /clients/{clientId} request requires authorization with the following scope:

  • fabric/authorization.read

Request Body

Do not supply a request body with this method

Responses

200

[
  {
    "id": guid,
    "name": string,
    "topLevelSecurableItem":{
            "id": guid,
            "name": string,
            "securableItems":[
                {
                    "id": guid,
                    "name": string,
                    "securableItems": []
                }
            ]
        }
  }
]

403 Forbidden

A Forbidden response will be returned in the following cases:

  • If the requested clientid does not match the clientid presented and the access token does not have the fabric/authorization.manageclients scope
  • If the access token can not be validated (i.e. is forged or doesn't have the correct scope)

Post

This method allows clients to add clients to the Authorization service store.

POST /clients/

Parameters

Name Location Type Description
None N/A N/A N/A

Authorization

This request requires authorization with the following scopes:

  • fabric/authorization.manageclients
  • fabric/authorization.write

Request Body

{
    "name": string,
    "topLevelSecurableItem": {
            "id": guid,
            "name": string
        }
}

Responses

201

A 201 created response will be returned if the client is successfully created and will include the client object that was created:

{
    "name": string,
    "topLevelSecurableItem": {
            "name": string
        }
}

400

A 400 Bad Request will be returned in the following cases:

  • If the request is malformed
  • If the client already exists

403 Forbidden

A Forbidden response will be returned in the following cases:

  • If the access token can not be validated (i.e. is forged or doesn't have the correct scope)