Skip to content

Commit 17ed577

Browse files
authored
Merge pull request #113 from connery-io/con-91
refactor: deprecate unused `/api/tools/verify-access` endpoint
2 parents 4e74493 + 859d3a0 commit 17ed577

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { Public } from '../auth.guard.js';
22
import { Controller, Get } from '@nestjs/common';
33
import {
4-
ApiSecurity,
54
ApiTags,
65
ApiOperation,
76
ApiExtraModels,
87
ApiInternalServerErrorResponse,
98
getSchemaPath,
10-
ApiUnauthorizedResponse,
119
ApiOkResponse,
1210
} from '@nestjs/swagger';
1311
import { GenericErrorResponse, GenericObjectResponse } from '../dto.js';
@@ -40,34 +38,4 @@ export class ToolsController {
4038
data: undefined,
4139
};
4240
}
43-
44-
@ApiOperation({
45-
summary: 'Verify if the request is authenticated.',
46-
description: 'Verify if the request is authenticated.',
47-
})
48-
@ApiOkResponse({
49-
description: 'The request is authenticated.',
50-
schema: {
51-
$ref: getSchemaPath(GenericObjectResponse),
52-
},
53-
})
54-
@ApiExtraModels(GenericErrorResponse)
55-
@ApiUnauthorizedResponse({
56-
description: 'Unauthorized.',
57-
schema: {
58-
$ref: getSchemaPath(GenericErrorResponse),
59-
},
60-
})
61-
@ApiSecurity('ApiKey')
62-
@Get('/verify-access')
63-
verifyAccess(): GenericObjectResponse<undefined> {
64-
// By default every API endpoint is protected by the AuthGuard. Including this one.
65-
// And the AuthGuard will throw an exception if the request is not authenticated.
66-
// This endpoint does not contain any business logic, it is only used to verify if the request is authenticated by the clients.
67-
68-
return {
69-
status: 'success',
70-
data: undefined,
71-
};
72-
}
7341
}

0 commit comments

Comments
 (0)