ESLint: Enable @typescript-eslint/naming-convention rule

This check enforces consistent variable naming.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-02-20 21:15:45 +01:00
parent c3129d40e0
commit 3626ce9dff
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
4 changed files with 32 additions and 6 deletions

View file

@ -69,7 +69,7 @@ export class AuthService {
return randomBytes(length);
}
BufferToBase64Url(text: Buffer): string {
bufferToBase64Url(text: Buffer): string {
// This is necessary as the is no base64url encoding in the toString method
// but as can be seen on https://tools.ietf.org/html/rfc4648#page-7
// base64url is quite easy buildable from base64
@ -93,8 +93,8 @@ export class AuthService {
`User '${user.userName}' has already 200 tokens and can't have anymore`,
);
}
const secret = this.BufferToBase64Url(await this.randomString(54));
const keyId = this.BufferToBase64Url(await this.randomString(8));
const secret = this.bufferToBase64Url(await this.randomString(54));
const keyId = this.bufferToBase64Url(await this.randomString(8));
const accessToken = await this.hashPassword(secret);
let token;
// Tokens can only be valid for a maximum of 2 years