Skip to content

Commit 2916ad7

Browse files
committed
remove unnecessary comments
1 parent 0fbb2d5 commit 2916ad7

File tree

18 files changed

+17
-35
lines changed

18 files changed

+17
-35
lines changed

exercises/01.discovery/02.solution.as/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export default {
7171
handler: async (request, env, ctx) => {
7272
const url = new URL(request.url)
7373

74-
// for backwards compatibility with old clients that think we're the authorization server
7574
if (url.pathname === '/.well-known/oauth-authorization-server') {
7675
return handleOAuthAuthorizationServerRequest()
7776
}

exercises/01.discovery/03.solution.pr/src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { EPIC_ME_AUTH_SERVER_URL } from './client.ts'
22

33
export async function handleOAuthProtectedResourceRequest(request: Request) {
4-
// This server is the protected resource server, so we return our own configuration
54
const resourceServerUrl = new URL(request.url)
6-
resourceServerUrl.pathname = '/mcp' // Point to the MCP endpoint
5+
resourceServerUrl.pathname = '/mcp'
76

87
return Response.json({
98
resource: resourceServerUrl.toString(),

exercises/02.init/01.problem.authenticate/src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import { EPIC_ME_AUTH_SERVER_URL } from './client.ts'
55
* This is how the client knows where to request authorization from.
66
*/
77
export async function handleOAuthProtectedResourceRequest(request: Request) {
8-
// This server is the protected resource server, so we return our own configuration
98
const resourceServerUrl = new URL(request.url)
10-
resourceServerUrl.pathname = '/mcp' // Point to the MCP endpoint
9+
resourceServerUrl.pathname = '/mcp'
1110

1211
return Response.json({
1312
resource: resourceServerUrl.toString(),

exercises/02.init/01.solution.authenticate/src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ export function handleUnauthorized() {
1414
* This is how the client knows where to request authorization from.
1515
*/
1616
export async function handleOAuthProtectedResourceRequest(request: Request) {
17-
// This server is the protected resource server, so we return our own configuration
1817
const resourceServerUrl = new URL(request.url)
19-
resourceServerUrl.pathname = '/mcp' // Point to the MCP endpoint
18+
resourceServerUrl.pathname = '/mcp'
2019

2120
return Response.json({
2221
resource: resourceServerUrl.toString(),

exercises/02.init/02.problem.params/src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ export function handleUnauthorized() {
1414
* This is how the client knows where to request authorization from.
1515
*/
1616
export async function handleOAuthProtectedResourceRequest(request: Request) {
17-
// This server is the protected resource server, so we return our own configuration
1817
const resourceServerUrl = new URL(request.url)
19-
resourceServerUrl.pathname = '/mcp' // Point to the MCP endpoint
18+
resourceServerUrl.pathname = '/mcp'
2019

2120
return Response.json({
2221
resource: resourceServerUrl.toString(),

exercises/02.init/02.solution.params/src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ export function handleUnauthorized(request: Request) {
2424
* This is how the client knows where to request authorization from.
2525
*/
2626
export async function handleOAuthProtectedResourceRequest(request: Request) {
27-
// This server is the protected resource server, so we return our own configuration
2827
const resourceServerUrl = new URL(request.url)
29-
resourceServerUrl.pathname = '/mcp' // Point to the MCP endpoint
28+
resourceServerUrl.pathname = '/mcp'
3029

3130
return Response.json({
3231
resource: resourceServerUrl.toString(),

exercises/03.auth-info/01.problem.introspect/src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ export function handleUnauthorized(request: Request) {
2424
* This is how the client knows where to request authorization from.
2525
*/
2626
export async function handleOAuthProtectedResourceRequest(request: Request) {
27-
// This server is the protected resource server, so we return our own configuration
2827
const resourceServerUrl = new URL(request.url)
29-
resourceServerUrl.pathname = '/mcp' // Point to the MCP endpoint
28+
resourceServerUrl.pathname = '/mcp'
3029

3130
return Response.json({
3231
resource: resourceServerUrl.toString(),

exercises/03.auth-info/01.solution.introspect/src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ export function handleUnauthorized(request: Request) {
6464
* This is how the client knows where to request authorization from.
6565
*/
6666
export async function handleOAuthProtectedResourceRequest(request: Request) {
67-
// This server is the protected resource server, so we return our own configuration
6867
const resourceServerUrl = new URL(request.url)
69-
resourceServerUrl.pathname = '/mcp' // Point to the MCP endpoint
68+
resourceServerUrl.pathname = '/mcp'
7069

7170
return Response.json({
7271
resource: resourceServerUrl.toString(),

exercises/03.auth-info/02.problem.active/src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ export function handleUnauthorized(request: Request) {
6464
* This is how the client knows where to request authorization from.
6565
*/
6666
export async function handleOAuthProtectedResourceRequest(request: Request) {
67-
// This server is the protected resource server, so we return our own configuration
6867
const resourceServerUrl = new URL(request.url)
69-
resourceServerUrl.pathname = '/mcp' // Point to the MCP endpoint
68+
resourceServerUrl.pathname = '/mcp'
7069

7170
return Response.json({
7271
resource: resourceServerUrl.toString(),

exercises/03.auth-info/02.solution.active/src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ export function handleUnauthorized(request: Request) {
7272
* This is how the client knows where to request authorization from.
7373
*/
7474
export async function handleOAuthProtectedResourceRequest(request: Request) {
75-
// This server is the protected resource server, so we return our own configuration
7675
const resourceServerUrl = new URL(request.url)
77-
resourceServerUrl.pathname = '/mcp' // Point to the MCP endpoint
76+
resourceServerUrl.pathname = '/mcp'
7877

7978
return Response.json({
8079
resource: resourceServerUrl.toString(),

0 commit comments

Comments
 (0)