Skip to main content

Class: StrategiesMiddleware

strategies/strategies.middleware.StrategiesMiddleware

Hierarchy

Constructors

constructor

new StrategiesMiddleware(strategiesService, strategyInstanceService, performAuthFunctionService, imsUserFindingService)

Parameters

NameType
strategiesServiceStrategiesService
strategyInstanceServiceStrategyInstanceService
performAuthFunctionServicePerformAuthFunctionService
imsUserFindingServiceImsUserFindingService

Overrides

StateMiddleware.constructor

Defined in

gropius-login-service/backend/src/strategies/strategies.middleware.ts:21

Properties

imsUserFindingService

Private Readonly imsUserFindingService: ImsUserFindingService

Defined in

gropius-login-service/backend/src/strategies/strategies.middleware.ts:25


logger

Private Readonly logger: Logger

Defined in

gropius-login-service/backend/src/strategies/strategies.middleware.ts:20


performAuthFunctionService

Private Readonly performAuthFunctionService: PerformAuthFunctionService

Defined in

gropius-login-service/backend/src/strategies/strategies.middleware.ts:24


strategiesService

Private Readonly strategiesService: StrategiesService

Defined in

gropius-login-service/backend/src/strategies/strategies.middleware.ts:22


strategyInstanceService

Private Readonly strategyInstanceService: StrategyInstanceService

Defined in

gropius-login-service/backend/src/strategies/strategies.middleware.ts:23

Methods

appendState

Protected appendState(res, appendedState): void

Parameters

NameType
resResponse<any, Record<string, any>>
appendedState{ error?: any } | Partial<AuthStateServerData & OAuthAuthorizeServerState & { strategy: Strategy }> & { error?: any }

Returns

void

Inherited from

StateMiddleware.appendState

Defined in

gropius-login-service/backend/src/api-oauth/StateMiddleware.ts:42


idToStrategyInstance

Private idToStrategyInstance(id): Promise<StrategyInstance>

Parameters

NameType
idstring

Returns

Promise<StrategyInstance>

Defined in

gropius-login-service/backend/src/strategies/strategies.middleware.ts:30


performImsUserSearchIfNeeded

performImsUserSearchIfNeeded(state, instance, strategy): Promise<void>

Parameters

NameType
stateAuthStateServerData
instanceStrategyInstance
strategyStrategy

Returns

Promise<void>

Defined in

gropius-login-service/backend/src/strategies/strategies.middleware.ts:41


use

use(req, res, next): Promise<void>

Parameters

NameType
reqRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
resResponse<any, Record<string, any>>
next(error?: any) => any

Returns

Promise<void>

Inherited from

StateMiddleware.use

Defined in

gropius-login-service/backend/src/api-oauth/StateMiddleware.ts:8


useWithError

Protected useWithError(req, res, state, error, next): void

Overwrite this to handle errors

Parameters

NameType
reqRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
resResponse<any, Record<string, any>>
stateAuthStateServerData & OAuthAuthorizeServerState & { error?: any }
errorany
next(error?: any) => void

Returns

void

Inherited from

StateMiddleware.useWithError

Defined in

gropius-login-service/backend/src/api-oauth/StateMiddleware.ts:32


useWithState

Protected useWithState(req, res, state, next): Promise<any>

Parameters

NameType
reqRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
resResponse<any, Record<string, any>>
stateAuthStateServerData & OAuthAuthorizeServerState & { error?: any }
next(error?: any) => void

Returns

Promise<any>

Overrides

StateMiddleware.useWithState

Defined in

gropius-login-service/backend/src/strategies/strategies.middleware.ts:62