Skip to content

@sourceloop/oidc-service / Exports / FindAccountProvider

Class: FindAccountProvider

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new FindAccountProvider(userRepository)

Parameters

Name Type
userRepository UserRepository

Defined in

services/oidc-service/src/providers/find-account.provider.ts:17

Properties

userRepository

Protected userRepository: UserRepository

Defined in

services/oidc-service/src/providers/find-account.provider.ts:19

Methods

value

value(): FindAccountProviderFn

The function returns a Promise that finds a user account based on a provided username and returns account information and claims.

Returns

FindAccountProviderFn

The value() function is returning an asynchronous function that takes in context (ctx), subject (sub), and token as parameters and returns a Promise of FindAccountResult. Inside this function, it queries the user repository to find a user with the provided username (sub), extracts certain user claims based on a predefined list (claimsProfile), and constructs a response object with the account

Implementation of

Provider.value

Defined in

services/oidc-service/src/providers/find-account.provider.ts:31