Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.85 KB

fetchUserInfo.md

File metadata and controls

37 lines (24 loc) · 1.85 KB

Function: fetchUserInfo()

💗 Help the project

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.

Parameters

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 -

Returns

Promise<UserInfoResponse>

See

OpenID Connect Core 1.0