fabric-testbed / fabric-core-api

Python (Flask) based ReSTful API for FABRIC Core User Services
MIT License
0 stars 0 forks source link

services authorization check endpoint #59

Closed mjstealey closed 3 months ago

mjstealey commented 9 months ago

Endpoint

/people/services-auth

GET request

Example GET:

curl -X 'GET' ${API_URL}'/people/services-auth?sub=http://cilogon.org/serverA/users/242181' \
  -H 'Authorization: Bearer '${TOKEN} \
  -H 'Content-Type: application/json'

Example Response:

{
  "results": [
    {
      "email": "stealey@unc.edu",
      "name": "Michael J. Stealey, Sr",
      "roles": [
        {
          "description": "FABRIC Staff No Permissions",
          "name": "04b14c17-e66a-4405-98fc-d737717e2160-pm"
        },
        {
          "description": "FABRIC Tutorials",
          "name": "a7818636-1fa1-4e77-bb03-d171598b0862-po"
        },
        {
          "description": "Active Users of FABRIC - initially set by enrollment workflow",
          "name": "fabric-active-users"
        },
        {
          "description": "Jupyterhub access - based on project participation",
          "name": "Jupyterhub"
        }
      ],
      "uuid": "b12b961d-98ec-46f1-a938-af7a5ec0410b"
    }
  ],
  "size": 1,
  "status": 200,
  "type": "services-auth"
}