Abstract Class: BaseAuthBasicRouteMongo
Defined in: auth/src/routes/mongo/BaseAuthBasicRouteMongo.ts:8
Authenticates a user via HTTP Basic (RFC 7617) against their stored password/app-password secrets.
This is the route a downstream service with no interactive UI - e.g. a mail server validating a legacy
mail client's credentials against this authorization server - would call.
An account with requireMFA set cannot complete a real password login here (Basic auth has no way to
prompt for a second factor), UNLESS the submitted value matches one of the account's own app-password
secrets (see SecretType.APP_PASSWORD, BaseSecretRoute.validateAppPasswordCreate()). That bypass is
the entire point of app passwords: a standing, individually-revocable, high-entropy credential the user
explicitly creates for one Basic-auth-only client that can't do MFA, so enabling that one client doesn't
require disabling MFA for the account as a whole. A real password remains subject to requireMFA here
exactly as before - the bypass only ever applies to an app-password secret.
Extends
Constructors
Constructor
new BaseAuthBasicRouteMongo():
BaseAuthBasicRouteMongo
Returns
BaseAuthBasicRouteMongo
Inherited from
BaseAuthBasicRoute.constructor
Properties
aliasClass
protectedaliasClass:any=AliasMongo
Defined in: auth/src/routes/mongo/BaseAuthBasicRouteMongo.ts:9
Overrides
appPasswordEnabled
protectedappPasswordEnabled:boolean=true
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:69
Set to false to disable the app-password bypass below deployment-wide. An already-created app
password stops authenticating (falling through to the normal requireMFA/password checks, which
then reject it since it isn't a password-type secret) but is not deleted - re-enabling this
restores it exactly as it was. See BaseSecretRoute.appPasswordEnabled, which independently gates
creating new app passwords - the two are meant to be kept in sync, but this route reads its own
copy of the config so authentication doesn't depend on BaseSecretRoute being mounted.
Inherited from
BaseAuthBasicRoute.appPasswordEnabled
auditLogUtils?
protectedoptionalauditLogUtils?:AuditLogUtils
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:72
Inherited from
BaseAuthBasicRoute.auditLogUtils
authMiddleware?
protectedoptionalauthMiddleware?:AuthMiddleware
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:75
Inherited from
BaseAuthBasicRoute.authMiddleware
defaultScopes
protecteddefaultScopes:string[] =[]
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:78
Inherited from
BaseAuthBasicRoute.defaultScopes
jwtConfig?
protectedoptionaljwtConfig?:any
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:81
Inherited from
logger
protectedlogger:any
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:84
Inherited from
passwordConfig
protectedpasswordConfig:PasswordConfig
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:87
Inherited from
BaseAuthBasicRoute.passwordConfig
rateLimiter?
protectedoptionalrateLimiter?:RateLimiter
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:90
Inherited from
BaseAuthBasicRoute.rateLimiter
secretClass
protectedsecretClass:any=SecretMongo
Defined in: auth/src/routes/mongo/BaseAuthBasicRouteMongo.ts:10
Overrides
BaseAuthBasicRoute.secretClass
secretRepo?
protectedoptionalsecretRepo?:RepoUtils<SecretMongo>
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:92
Inherited from
tokenUtils?
protectedoptionaltokenUtils?:TokenUtils
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:95
Inherited from
trustedProxies
protectedtrustedProxies:string[] =[]
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:98
Inherited from
BaseAuthBasicRoute.trustedProxies
userClass
protecteduserClass:any=UserMongo
Defined in: auth/src/routes/mongo/BaseAuthBasicRouteMongo.ts:11
Overrides
userUtils?
protectedoptionaluserUtils?:UserUtils<UserMongo,AliasMongo>
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:100
Inherited from
Methods
authenticate()
authenticate(
user,req,res):Promise<AuthResult|undefined>
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:286
Authenticates the user using HTTP Basic and returns a JSON Web Token access token to be used with future API requests.
Parameters
user
JWTUser
req
HttpRequest
res
HttpResponse
Returns
Promise<AuthResult | undefined>
Inherited from
BaseAuthBasicRoute.authenticate
initialize()
protectedinitialize():Promise<void>
Defined in: auth/src/routes/BaseAuthBasicRoute.ts:106
Called on server startup to initialize the route with any defaults.
Returns
Promise<void>