@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¶
Properties¶
config¶
• Private
Readonly
config: RestExplorerConfig
Defined in¶
verifier¶
• Private
Readonly
verifier: HttpAuthenticationVerifier
Defined in¶
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¶
intercept¶
▸ intercept(context
, next
): Promise
<any
>
Parameters¶
Name | Type |
---|---|
context |
MiddlewareContext |
next |
() => any |
Returns¶
Promise
<any
>
Defined in¶
isOpenAPISpecRequest¶
▸ Private
isOpenAPISpecRequest(request
): boolean
Parameters¶
Name | Type |
---|---|
request |
Request <ParamsDictionary , any , any , ParsedQs , Record <string , any >> |
Returns¶
boolean
Defined in¶
isRequestContext¶
▸ Private
isRequestContext(context?
): context is RequestContext
Parameters¶
Name | Type |
---|---|
context? |
Context |
Returns¶
context is RequestContext
Defined in¶
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