Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.
▸ fetchUserInfo(config
, accessToken
, expectedSubject
, options
?): Promise
<UserInfoResponse
>
Performs a UserInfo Request at the userinfo endpoint and returns the parsed UserInfo claims from either its JSON or JWT response.
Authorization Header is used to transmit the Access Token value. No other Access Token means of transport are supported.
Note: URL of authorization server's UserInfo endpoint must be configured.
Parameter | Type | Description |
---|---|---|
config |
Configuration |
- |
accessToken |
string |
OAuth 2.0 Access Token |
expectedSubject |
string | typeof skipSubjectCheck |
Expected sub claim value. In response to OpenID Connect authentication requests, the expected subject is the one from the ID Token claims retrieved from TokenEndpointResponseHelpers.claims which is available on all returned Token Endpoint responses. |
options ? |
DPoPOptions |
- |