debug: add debug log when login
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
parent
26a073968f
commit
9ff1012813
|
@ -2,6 +2,7 @@ import {
|
||||||
HttpStatus,
|
HttpStatus,
|
||||||
Inject,
|
Inject,
|
||||||
Injectable,
|
Injectable,
|
||||||
|
Logger,
|
||||||
UnauthorizedException,
|
UnauthorizedException,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { validatePassword } from 'src/core/helpers/password/bcrypt.helpers';
|
import { validatePassword } from 'src/core/helpers/password/bcrypt.helpers';
|
||||||
|
@ -30,6 +31,7 @@ export class LoginManager extends BaseCustomManager<UserEntity> {
|
||||||
|
|
||||||
async process(): Promise<void> {
|
async process(): Promise<void> {
|
||||||
// get user active by username
|
// get user active by username
|
||||||
|
Logger.debug('getOneByOptions', 'LoginManager');
|
||||||
this.userLogin = await this.dataService.getOneByOptions({
|
this.userLogin = await this.dataService.getOneByOptions({
|
||||||
where: {
|
where: {
|
||||||
username: this.data.username,
|
username: this.data.username,
|
||||||
|
@ -54,9 +56,13 @@ export class LoginManager extends BaseCustomManager<UserEntity> {
|
||||||
user_privilege_id: this.userLogin.user_privilege_id,
|
user_privilege_id: this.userLogin.user_privilege_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Logger.debug('Sign Token', 'LoginManager');
|
||||||
this.token = this.session.createAccessToken(tokenData);
|
this.token = this.session.createAccessToken(tokenData);
|
||||||
|
|
||||||
|
Logger.debug('refreshToken', 'LoginManager');
|
||||||
const refreshToken = this.session.createAccessToken(tokenData);
|
const refreshToken = this.session.createAccessToken(tokenData);
|
||||||
|
|
||||||
|
Logger.debug('Update Refresh Token', 'LoginManager');
|
||||||
// Update refresh token
|
// Update refresh token
|
||||||
await this.dataService.update(
|
await this.dataService.update(
|
||||||
this.queryRunner,
|
this.queryRunner,
|
||||||
|
@ -67,6 +73,7 @@ export class LoginManager extends BaseCustomManager<UserEntity> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Logger.debug('Process Login Done', 'LoginManager');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue