A little bit more of token handling
All checks were successful
ci/woodpecker/push/build Pipeline was successful

Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
This commit is contained in:
2026-05-17 22:11:35 +02:00
parent 68e166d90f
commit 1ca66a885b
4 changed files with 39 additions and 52 deletions

View File

@@ -55,7 +55,7 @@ func (srv *TokensServer) CreateToken(ctx context.Context, in *tokens.CreateToken
Scopes: permissions,
}
token, _, err := srv.tokenCtrl.Create(ctx, tokenData)
token, tokenID, err := srv.tokenCtrl.Create(ctx, tokenData)
if err != nil {
if errors.Is(err, controllers.ErrServerError) {
return nil, status.Error(codes.Internal, "Something is broken on our side")
@@ -64,6 +64,9 @@ func (srv *TokensServer) CreateToken(ctx context.Context, in *tokens.CreateToken
}
return &tokens.CreateTokenResponse{
TokenUuid: &tokens.TokenUUID{
Uuid: tokenID,
},
TokenValue: &tokens.TokenValue{Token: token},
}, nil
}