Files
medusa-store/docs/content/references/services/classes/AuthService.md
Shahed Nasser e134f6d237 chore: fixed commit branch on generate reference action (#1857)
* fixed commit branch

* fixes after yarn upgrade
2022-07-15 18:08:07 +03:00

5.2 KiB

Class: AuthService

Hierarchy

Constructors

constructor

new AuthService(__namedParameters)

Parameters

Name Type
__namedParameters InjectedDependencies

Overrides

TransactionBaseService<AuthService&gt;.constructor

Defined in

services/auth.ts:25

Properties

configModule

Protected Optional Readonly configModule: Record<string, unknown>

Inherited from

TransactionBaseService.configModule


container

Protected Readonly container: unknown

Inherited from

TransactionBaseService.container


customerService_

Protected Readonly customerService_: CustomerService

Defined in

services/auth.ts:23


manager_

Protected manager_: EntityManager

Overrides

TransactionBaseService.manager_

Defined in

services/auth.ts:20


transactionManager_

Protected transactionManager_: undefined | EntityManager

Overrides

TransactionBaseService.transactionManager_

Defined in

services/auth.ts:21


userService_

Protected Readonly userService_: UserService

Defined in

services/auth.ts:22

Methods

atomicPhase_

Protected atomicPhase_<TResult, TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>

Type parameters

Name
TResult
TError

Parameters

Name Type Description
work (transactionManager: EntityManager) => Promise<TResult>
isolationOrErrorHandler? IsolationLevel | (error: TError) => Promise<void | TResult>
maybeErrorHandlerOrDontFail? (error: TError) => Promise<void | TResult>

Returns

Promise<TResult>

Inherited from

TransactionBaseService.atomicPhase_

Defined in

interfaces/transaction-base-service.ts:53


authenticate

authenticate(email, password): Promise<AuthenticateResult>

Parameters

Name Type Description
email string
password string

Returns

Promise<AuthenticateResult>

Defined in

services/auth.ts:98


authenticateAPIToken

authenticateAPIToken(token): Promise<AuthenticateResult>

Parameters

Name Type Description
token string

Returns

Promise<AuthenticateResult>

Defined in

services/auth.ts:55


authenticateCustomer

authenticateCustomer(email, password): Promise<AuthenticateResult>

Parameters

Name Type Description
email string
password string

Returns

Promise<AuthenticateResult>

Defined in

services/auth.ts:147


comparePassword_

Protected comparePassword_(password, hash): Promise<boolean>

Parameters

Name Type Description
password string
hash string

Returns

Promise<boolean>

Defined in

services/auth.ts:39


shouldRetryTransaction_

Protected shouldRetryTransaction_(err): boolean

Parameters

Name Type
err Record<string, unknown> | { code: string }

Returns

boolean

Inherited from

TransactionBaseService.shouldRetryTransaction_

Defined in

interfaces/transaction-base-service.ts:34


withTransaction

withTransaction(transactionManager?): AuthService

Parameters

Name Type
transactionManager? EntityManager

Returns

AuthService

Inherited from

TransactionBaseService.withTransaction

Defined in

interfaces/transaction-base-service.ts:16