Abstract Class: BaseOAuthUserInfoRouteMongo
Defined in: auth/src/routes/mongo/BaseOAuthUserInfoRouteMongo.ts:8
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.
Extends
Constructors
Constructor
new BaseOAuthUserInfoRouteMongo():
BaseOAuthUserInfoRouteMongo
Returns
BaseOAuthUserInfoRouteMongo
Inherited from
BaseOAuthUserInfoRoute.constructor
Properties
authMiddleware?
protectedoptionalauthMiddleware?:AuthMiddleware
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:45
Inherited from
BaseOAuthUserInfoRoute.authMiddleware
oauthTokenUtils?
protectedoptionaloauthTokenUtils?:OAuthTokenUtils
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:47
Inherited from
BaseOAuthUserInfoRoute.oauthTokenUtils
profileClass
protectedprofileClass:any=ProfileMongo
Defined in: auth/src/routes/mongo/BaseOAuthUserInfoRouteMongo.ts:9
Overrides
BaseOAuthUserInfoRoute.profileClass
profileRepo?
protectedoptionalprofileRepo?:RepoUtils<ProfileMongo>
Defined in: auth/src/routes/BaseOAuthUserInfoRoute.ts:51
Inherited from
BaseOAuthUserInfoRoute.profileRepo
signingKeyClass
protectedsigningKeyClass:any=SigningKeyMongo
Defined in: auth/src/routes/mongo/BaseOAuthUserInfoRouteMongo.ts:10
Overrides
BaseOAuthUserInfoRoute.signingKeyClass
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>