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