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:
Philip Molares 2021-01-16 23:53:46 +01:00 committed by David Mehren
parent e04fcb9ee9
commit b589dedd2a
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -36,7 +36,9 @@ export class TokensController {
}
@Post()
async postToken(@Body() label: string): Promise<AuthTokenWithSecretDto> {
async postTokenRequest(
@Body() label: string,
): Promise<AuthTokenWithSecretDto> {
// ToDo: Get real userName
const authToken = await this.usersService.createTokenForUser(
'hardcoded',