(
value: string,
label: string,
policy: OAuthEndpointUrlPolicy = {},
)
| 149 | const MCP_PROTOCOL_VERSION_HEADER = "mcp-protocol-version"; |
| 150 | |
| 151 | const validateEndpointUrl = ( |
| 152 | value: string, |
| 153 | label: string, |
| 154 | policy: OAuthEndpointUrlPolicy = {}, |
| 155 | ): Effect.Effect<string, OAuthDiscoveryError> => |
| 156 | Effect.try({ |
| 157 | try: () => assertSupportedOAuthEndpointUrl(value, label, policy), |
| 158 | catch: (cause) => |
| 159 | new OAuthDiscoveryError({ |
| 160 | message: `${label} must use https: or loopback http:`, |
| 161 | cause, |
| 162 | }), |
| 163 | }); |
| 164 | |
| 165 | const validateAuthorizationServerMetadata = ( |
| 166 | metadata: OAuthAuthorizationServerMetadata, |
no test coverage detected