Abstract Class: BaseOAuthUserInfoRoute<P>
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:40
Handles the OIDC /userinfo endpoint (OIDC Core §5.3). Authenticates via the OAuth access token itself
(Authorization: Bearer <token>, through OAuthBearerStrategy — registered here under the fixed name
"oauth_bearer"), not this library's own relying-party @Auth(["jwt"])/ACL model: a third-party OAuth
client presenting a resource owner's access token isn't an ACL-scoped "user" of this app, it's a
delegated caller entitled only to whatever claims the resource owner consented to share (the token's own
scope).
sub is always present once openid scope is confirmed (enforced by @RequiresScope(["openid"])) —
every other claim is additive per OIDC Core §5.4's profile/email/phone claim groups. Deliberately
does not fetch the underlying User record: sub/scope already came from the verified token itself, so
only Profile (the source of every optional claim) is ever read, via the same RepoUtils<Profile> fetch
pattern used everywhere else in this library.
Extended by
Type Parameters
P
P extends Profile
Constructors
Constructor
new BaseOAuthUserInfoRoute<
P>():BaseOAuthUserInfoRoute<P>
Returns
BaseOAuthUserInfoRoute<P>
Properties
authMiddleware?
protectedoptionalauthMiddleware?:AuthMiddleware
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:45
oauthTokenUtils?
protectedoptionaloauthTokenUtils?:OAuthTokenUtils
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:47
profileClass
abstractprotectedprofileClass:any
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:49
profileRepo?
protectedoptionalprofileRepo?:RepoUtils<P>
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:51
signingKeyClass
abstractprotectedsigningKeyClass:any
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:53
Methods
userinfo()
userinfo(
user):Promise<any>
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:150
Returns claims about the authenticated resource owner, gated by the scope granted to the presented
access token. sub is always present; profile/email/phone scopes each add their own claim
group (OIDC Core §5.4), read from the owner's Profile — absent entirely if no such scope was
granted, or if the Profile carries nothing for that group.
Parameters
user
JWTUser
Returns
Promise<any>