mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
private: adds tokens controller
adds private api adds AuthTokenDto and AuthTokenWithSecretDto adds necessary methods in the users service adds RandomnessError Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
e04fcb9ee9
commit
b589dedd2a
1 changed files with 3 additions and 1 deletions
|
@ -36,7 +36,9 @@ export class TokensController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
async postToken(@Body() label: string): Promise<AuthTokenWithSecretDto> {
|
async postTokenRequest(
|
||||||
|
@Body() label: string,
|
||||||
|
): Promise<AuthTokenWithSecretDto> {
|
||||||
// ToDo: Get real userName
|
// ToDo: Get real userName
|
||||||
const authToken = await this.usersService.createTokenForUser(
|
const authToken = await this.usersService.createTokenForUser(
|
||||||
'hardcoded',
|
'hardcoded',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue