Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
breeg554 committed Oct 13, 2024
1 parent 9ab9120 commit 092d7de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/api/src/modules/queue/queue.auth-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ export class QueueAuthMiddleware implements NestMiddleware {
this.sendUnauthorizedResponse(res);
return;
}

const encodedCreds = authHeader.split(' ')[1];
const decodedCreds = Buffer.from(encodedCreds, 'base64').toString('utf-8');
const [username, password] = decodedCreds.split(':');
console.log('USERNAME', username);
console.log('PASSWORD', password);
console.log('USERNAME', username, this.username);
console.log('PASSWORD', password, this.passwordHash);
console.log(await bcrypt.hash(password, 10));

if (!this.username || !this.passwordHash || username !== this.username) {
this.sendUnauthorizedResponse(res);
return;
Expand Down

0 comments on commit 092d7de

Please sign in to comment.