Skip to content

@sourceloop/core / Exports / SecureSequence

Class: SecureSequence

Implements

  • SequenceHandler

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SecureSequence(findRoute, parseParams, invoke, send, reject, logger, authenticateRequest, authenticateClientRequest, checkAuthorisation, helmetAction, rateLimitAction, i18n, rateLimitConfig?, helmetConfig?)

Parameters

Name Type
findRoute FindRoute
parseParams ParseParams
invoke InvokeMethod
send Send
reject Reject
logger ILogger
authenticateRequest AuthenticateFn<IAuthUserWithPermissions<string, string, string>>
authenticateClientRequest AuthenticateFn<IAuthClient>
checkAuthorisation AuthorizeFn
helmetAction HelmetAction
rateLimitAction RateLimitAction
i18n i18nAPI
rateLimitConfig? object
helmetConfig? object

Defined in

packages/core/src/secure-sequence.ts:59

Properties

authenticateClientRequest

Protected authenticateClientRequest: AuthenticateFn<IAuthClient>

Defined in

packages/core/src/secure-sequence.ts:72


authenticateRequest

Protected authenticateRequest: AuthenticateFn<IAuthUserWithPermissions<string, string, string>>

Defined in

packages/core/src/secure-sequence.ts:70


checkAuthorisation

Protected checkAuthorisation: AuthorizeFn

Defined in

packages/core/src/secure-sequence.ts:74


expressMiddlewares

Protected expressMiddlewares: ExpressRequestHandler[] = []

Defined in

packages/core/src/secure-sequence.ts:57


findRoute

Protected findRoute: FindRoute

Defined in

packages/core/src/secure-sequence.ts:61


helmetAction

Protected helmetAction: HelmetAction

Defined in

packages/core/src/secure-sequence.ts:76


helmetConfig

Private Optional Readonly helmetConfig: object

Defined in

packages/core/src/secure-sequence.ts:84


i18n

Protected i18n: i18nAPI

Defined in

packages/core/src/secure-sequence.ts:80


invoke

Protected invoke: InvokeMethod

Defined in

packages/core/src/secure-sequence.ts:65


invokeMiddleware

Protected invokeMiddleware: InvokeMiddleware

Optional invoker for registered middleware in a chain. To be injected via SequenceActions.INVOKE_MIDDLEWARE.

Defined in

packages/core/src/secure-sequence.ts:55


logger

logger: ILogger

Defined in

packages/core/src/secure-sequence.ts:68


parseParams

Protected parseParams: ParseParams

Defined in

packages/core/src/secure-sequence.ts:63


rateLimitAction

Protected rateLimitAction: RateLimitAction

Defined in

packages/core/src/secure-sequence.ts:78


rateLimitConfig

Private Optional Readonly rateLimitConfig: object

Defined in

packages/core/src/secure-sequence.ts:82


reject

reject: Reject

Defined in

packages/core/src/secure-sequence.ts:67


send

send: Send

Defined in

packages/core/src/secure-sequence.ts:66

Methods

_handleErrorMessage

Private _handleErrorMessage(error): void

Parameters

Name Type
error Error

Returns

void

Defined in

packages/core/src/secure-sequence.ts:158


_rejectErrors

Private _rejectErrors(err): Error

Parameters

Name Type
err any

Returns

Error

Defined in

packages/core/src/secure-sequence.ts:178


handle

handle(context): Promise<void>

Parameters

Name Type
context RequestContext

Returns

Promise<void>

Implementation of

SequenceHandler.handle

Defined in

packages/core/src/secure-sequence.ts:87