Skip to content

auth.Class.LocalAuthService

Sclable CI edited this page Apr 10, 2026 · 22 revisions

@sclable/nestjs-libs / auth / LocalAuthService

Class: LocalAuthService<UserType>

Defined in: packages/auth/src/services/local-auth.service.ts:9

Extends

  • AuthService<UserType>

Type Parameters

UserType

UserType extends ApplicationUserContract

Constructors

Constructor

new LocalAuthService<UserType>(userService, jwtService): LocalAuthService<UserType>

Defined in: packages/auth/src/services/local-auth.service.ts:12

Parameters

userService

UserServiceContract<UserType>

jwtService

JwtService

Returns

LocalAuthService<UserType>

Overrides

AuthService<UserType>.constructor

Properties

jwtService

protected readonly jwtService: JwtService

Defined in: packages/auth/src/services/local-auth.service.ts:14

Inherited from

AuthService.jwtService

Methods

addToBlacklist()

addToBlacklist(jwtPayload): void

Defined in: packages/auth/src/services/auth.service.ts:38

Parameters

jwtPayload

JwtPayload

Returns

void

Inherited from

AuthService.addToBlacklist


decodeAuthorizationHeaderToken()

decodeAuthorizationHeaderToken(headerToken): JwtPayload

Defined in: packages/auth/src/services/auth.service.ts:21

Parameters

headerToken

string

Returns

JwtPayload

Inherited from

AuthService.decodeAuthorizationHeaderToken


getAccessToken()

getAccessToken(user): Promise<string>

Defined in: packages/auth/src/services/local-auth.service.ts:23

Parameters

user

ApplicationUserContract

Returns

Promise<string>


getApplicationUser()

getApplicationUser(token): Promise<UserType | null>

Defined in: packages/auth/src/services/local-auth.service.ts:35

Parameters

token

JwtPayload

Returns

Promise<UserType | null>

Overrides

AuthService.getApplicationUser


isBlackListed()

isBlackListed(jwtPayload): boolean

Defined in: packages/auth/src/services/auth.service.ts:34

Parameters

jwtPayload

JwtPayload

Returns

boolean

Inherited from

AuthService.isBlackListed


isValid()

isValid(jwtPayload): boolean

Defined in: packages/auth/src/services/auth.service.ts:25

Parameters

jwtPayload

JwtPayload

Returns

boolean

Inherited from

AuthService.isValid


validateUser()

validateUser(username, password): Promise<UserType | null>

Defined in: packages/auth/src/services/local-auth.service.ts:19

Parameters

username

string

password

string

Returns

Promise<UserType | null>


userDataChanged()

protected static userDataChanged(user, token): boolean

Defined in: packages/auth/src/services/auth.service.ts:12

Parameters

user

ApplicationUserContract

token

JwtPayload

Returns

boolean

Inherited from

AuthService.userDataChanged

Clone this wiki locally