PESU OAuth2 · Docs

GET|POST /userinfo

UserInfo

Summary

Returns OIDC claims for the subject of a valid access token, filtered by the token's granted scopes.

Auth

Authorization: Bearer <access_token> (JWT access token from /token).

Parameters

Name In Required Type Description
Authorization header yes string Bearer access token.

Example request

GET /userinfo HTTP/1.1
Host: <issuer-host>
Authorization: Bearer ACCESS_TOKEN

Success

JSON claims always including sub. With profile: name, prn, srn, program, branch, semester, section, campus. With email: email (when available). With phone: phone_number (when available).

Errors

Code Description
invalid_token Missing, invalid, or expired Bearer token, or subject no longer exists (401).

Notes

  • POST /userinfo with the same Bearer header is also supported.
  • No vault or resource-API scopes in this MVP.