OAuthTestHelper (anubis_mcp v1.6.0)
Copy MarkdownHelpers for testing OAuth 2.1 authorization in Anubis servers.
Provides token building, mock validator construction, and fixtures for Bypass-based HTTP endpoint mocking.
Summary
Functions
Returns a mock introspection response body for an active token.
Builds a minimal authorization config map (as if parsed by Authorization.parse_config!/1).
Builds a normalized claims map suitable for injecting into Context.auth.
Returns an inactive introspection response body.
Returns the introspection endpoint URL for a Bypass instance.
Configures a Bypass instance to serve an introspection endpoint.
Functions
Returns a mock introspection response body for an active token.
Builds a minimal authorization config map (as if parsed by Authorization.parse_config!/1).
Builds a normalized claims map suitable for injecting into Context.auth.
Defaults to a non-expired token for resource with scopes ["tools:read"].
Returns an inactive introspection response body.
Returns the introspection endpoint URL for a Bypass instance.
Configures a Bypass instance to serve an introspection endpoint.
The respond option controls what the endpoint returns:
:active— returns an active token response (default):inactive— returns an inactive token response{:error, status}— returns an error HTTP status