Skip to main content
Version: 0.2.0-beta.1

Type Alias: ValidateIssuerFunction()

type ValidateIssuerFunction = (tokenIssuer: string) => void;

Function type for validating the issuer of the access token.

This function should throw an MCPAuthBearerAuthError with code 'invalid_issuer' if the issuer is not valid. The issuer should be validated against:

  1. The authorization servers configured in MCP-Auth's auth server metadata
  2. The authorization servers listed in the protected resource's metadata

Parameters

tokenIssuer

string

Returns

void

Throws

When the issuer is not recognized or invalid.