File tree Expand file tree Collapse file tree 18 files changed +17
-35
lines changed
01.problem.authenticate/src
01.solution.authenticate/src
01.problem.introspect/src
01.solution.introspect/src
01.problem.validate-scopes/src
01.solution.validate-scopes/src
02.problem.specify-scopes/src
02.solution.specify-scopes/src Expand file tree Collapse file tree 18 files changed +17
-35
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 11import { EPIC_ME_AUTH_SERVER_URL } from './client.ts'
22
33export 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 ( ) ,
Original file line number Diff line number Diff 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 */
77export 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 ( ) ,
Original file line number Diff line number Diff line change @@ -14,9 +14,8 @@ export function handleUnauthorized() {
1414 * This is how the client knows where to request authorization from.
1515 */
1616export 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 ( ) ,
Original file line number Diff line number Diff line change @@ -14,9 +14,8 @@ export function handleUnauthorized() {
1414 * This is how the client knows where to request authorization from.
1515 */
1616export 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 ( ) ,
Original file line number Diff line number Diff line change @@ -24,9 +24,8 @@ export function handleUnauthorized(request: Request) {
2424 * This is how the client knows where to request authorization from.
2525 */
2626export 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 ( ) ,
Original file line number Diff line number Diff line change @@ -24,9 +24,8 @@ export function handleUnauthorized(request: Request) {
2424 * This is how the client knows where to request authorization from.
2525 */
2626export 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 ( ) ,
Original file line number Diff line number Diff line change @@ -64,9 +64,8 @@ export function handleUnauthorized(request: Request) {
6464 * This is how the client knows where to request authorization from.
6565 */
6666export 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 ( ) ,
Original file line number Diff line number Diff line change @@ -64,9 +64,8 @@ export function handleUnauthorized(request: Request) {
6464 * This is how the client knows where to request authorization from.
6565 */
6666export 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 ( ) ,
Original file line number Diff line number Diff line change @@ -72,9 +72,8 @@ export function handleUnauthorized(request: Request) {
7272 * This is how the client knows where to request authorization from.
7373 */
7474export 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 ( ) ,
You can’t perform that action at this time.
0 commit comments