mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 18:55:19 -04:00
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:
parent
c3129d40e0
commit
3626ce9dff
4 changed files with 32 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue