mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-15 15:59:09 +00:00
FEAT: add verify access token path
This commit is contained in:
+15
-1
@@ -264,6 +264,20 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/auth/verify-access-token": {
|
||||
"get": {
|
||||
"operationId": "AuthController_verifyAccessToken",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"Auth"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/connectors": {
|
||||
"post": {
|
||||
"operationId": "ConnectorController_uploadConnector",
|
||||
@@ -3233,7 +3247,7 @@
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
"title": "Maestro - feat/view-table",
|
||||
"title": "Maestro - feature/verify-refresh-token",
|
||||
"description": "Documentation for Maestro gateway",
|
||||
"version": "1.0.0",
|
||||
"contact": {}
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
HttpStatus,
|
||||
Inject,
|
||||
UseFilters,
|
||||
Get,
|
||||
} from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import {
|
||||
@@ -21,7 +22,10 @@ import {
|
||||
} from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/messages';
|
||||
|
||||
import { PERMISSIONS_GROUPS } from 'src/authentication/permissions.enum';
|
||||
import { RequireAllPermissions } from 'src/authentication/authentication.decorator';
|
||||
import {
|
||||
Authenticated,
|
||||
RequireAllPermissions,
|
||||
} from 'src/authentication/authentication.decorator';
|
||||
import { AuthClientService } from './auth.service';
|
||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||
import { GrpcToHttpExceptionFilter } from '../../error/grpc-to-http-exception.filter';
|
||||
@@ -185,4 +189,11 @@ export class AuthController {
|
||||
|
||||
return this.authClient.verifyTotp({ accessToken, totp });
|
||||
}
|
||||
|
||||
@Authenticated()
|
||||
@Get('verify-access-token')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
verifyAccessToken() {
|
||||
return { access_token_status: 'valid' };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user