Skip to content

@sourceloop/core / Exports / AuthenticateSwaggerMiddlewareInterceptor

Class: AuthenticateSwaggerMiddlewareInterceptor

Implements

  • Provider<Middleware>

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AuthenticateSwaggerMiddlewareInterceptor(verifier, config)

Parameters

Name Type
verifier HttpAuthenticationVerifier
config RestExplorerConfig

Defined in

packages/core/src/components/swagger-authentication/middlewares/authenticate-swagger.middleware.ts:27

Properties

config

Private Readonly config: RestExplorerConfig

Defined in

packages/core/src/components/swagger-authentication/middlewares/authenticate-swagger.middleware.ts:31


verifier

Private Readonly verifier: HttpAuthenticationVerifier

Defined in

packages/core/src/components/swagger-authentication/middlewares/authenticate-swagger.middleware.ts:29

Methods

decodeHeader

Private decodeHeader(request): Object

Parameters

Name Type
request Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Returns

Object

Name Type
password string
username undefined | string

Defined in

packages/core/src/components/swagger-authentication/middlewares/authenticate-swagger.middleware.ts:60


intercept

intercept(context, next): Promise<any>

Parameters

Name Type
context MiddlewareContext
next () => any

Returns

Promise<any>

Defined in

packages/core/src/components/swagger-authentication/middlewares/authenticate-swagger.middleware.ts:37


isOpenAPISpecRequest

Private isOpenAPISpecRequest(request): boolean

Parameters

Name Type
request Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Returns

boolean

Defined in

packages/core/src/components/swagger-authentication/middlewares/authenticate-swagger.middleware.ts:74


isRequestContext

Private isRequestContext(context?): context is RequestContext

Parameters

Name Type
context? Context

Returns

context is RequestContext

Defined in

packages/core/src/components/swagger-authentication/middlewares/authenticate-swagger.middleware.ts:82


value

value(): (context: MiddlewareContext, next: () => any) => Promise<any>

Returns

fn

▸ (context, next): Promise<any>

Parameters
Name Type
context MiddlewareContext
next () => any
Returns

Promise<any>

Implementation of

Provider.value

Defined in

packages/core/src/components/swagger-authentication/middlewares/authenticate-swagger.middleware.ts:33