fabric-testbed / fabric-core-api

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

v1.6.x - feature - user verification endpoint #43

Closed mjstealey closed 11 months ago

mjstealey commented 1 year ago

Cookie based user verification endpoint to provide basic debugging information regarding account access or status

Example without cookie:

{
  "results": [
    {
      "cookie_attributes": {},
      "cookie_name": "COOKIE_NOT_FOUND",
      "fabric_attributes": {}
    }
  ],
  "size": 1,
  "status": 200,
  "type": "check-cookie"
}

Example with cookie:

{
  "results": [
    {
      "cookie_attributes": {
        "email": "CLAIM_NOT_FOUND",
        "family_name": "CLAIM_NOT_FOUND",
        "given_name": "CLAIM_NOT_FOUND",
        "name": "CLAIM_NOT_FOUND",
        "sub": "http://cilogon.org/serverA/users/xxxxxxx"
      },
      "cookie_name": "fabric-service-alpha",
      "fabric_attributes": {
        "affiliation": [
          "University of North Carolina at Chapel Hill"
        ],
        "roles": [
          "10582cb1-ee10-4b8c-8d61-ffc4688be0d6-pc",
          "10582cb1-ee10-4b8c-8d61-ffc4688be0d6-po",
          "10582cb1-ee10-4b8c-8d61-ffc4688be0d6-tk",
          "1af8e23d-5fa8-46fc-be94-21609abbadd0-pc",
          "1af8e23d-5fa8-46fc-be94-21609abbadd0-po",
          "8b3a2eae-a0c0-475a-807b-e9af581ce4c0-pm",
          "8b3a2eae-a0c0-475a-807b-e9af581ce4c0-tk",
          "a5488d93-7c6b-48ea-9de1-19e216c0519b-pc",
          "a5488d93-7c6b-48ea-9de1-19e216c0519b-po",
          "approval-committee ",
          "d74993c8-e3b5-451c-977f-c7cc544f176f-pc",
          "d74993c8-e3b5-451c-977f-c7cc544f176f-po",
          "ec8389c8-6129-40aa-a6ee-3a1d80d74f33-pc",
          "fabric-active-users",
          "facility-operators",
          "Jupyterhub",
          "long-lived-tokens",
          "portal-admins",
          "project-leads"
        ],
        "sub": [
          "http://cilogon.org/serverA/users/xxxxxxx"
        ],
        "uuid": "593dd0d3-cedb-4bc6-9522-a945da0a8a8e"
      }
    }
  ],
  "size": 1,
  "status": 200,
  "type": "check-cookie"
}
mjstealey commented 11 months ago

merged and deployed