Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/oauth4webapi/src/index.ts>processUserInfoResponse

OAuth 2 / OpenID Connect for JavaScript Runtimes
Go to Latest
function processUserInfoResponse
import { processUserInfoResponse } from "https://deno.land/x/oauth4webapi@v2.7.0/src/index.ts";

Validates Response instance to be one coming from the AuthorizationServer.userinfo_endpoint | as.userinfo_endpoint.

Parameters

Authorization Server Metadata.

client: Client

Client Metadata.

expectedSubject: string | 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 getValidatedIdTokenClaims.

response: Response

Resolved value from userInfoRequest.

Returns

Resolves with an object representing the parsed successful response, or an object representing an OAuth 2.0 protocol style error. Use isOAuth2Error to determine if an OAuth 2.0 error was returned.