Skip to main content

Overview

Methods

getPrimary()

Get the primary auth provider.
Example:

getAuthProviders()

Get all auth provider entries.
Example:

Auth Modes

FrontMCP supports multiple authentication modes:

Public

No authentication required

Transparent

Auth handled externally

Orchestrated

Full auth flow management

Public Mode

No authentication required:

Transparent Mode

Auth is handled by an external system (e.g., API gateway):

Orchestrated Mode

Full auth flow with OAuth support:

Properties

primary

The primary auth provider instance (FrontMcpAuth).

parsedOptions

The parsed authentication configuration.

requiresOrchestration

Whether the current configuration requires orchestration.

detection

Auth provider detection result across apps in scope.

Auth Provider Detection

The registry detects auth requirements across the scope hierarchy:

Context Extensions

Orchestrated auth installs context extensions:

Configuration Validation

The registry validates auth configuration:

FrontMcpAuth API

The primary auth provider exposes:

Session Integration

Auth integrates with session management:

Multi-App Auth

When multiple apps have different auth requirements:

FrontMcpAuthContext

The FrontMcpAuthContext is a request-scoped auth identity object available inside tool, resource, and prompt execution. It provides role, permission, and scope checks extracted from JWT claims.

Properties

Methods

Extension

Add custom typed fields via global interface augmentation:
Custom fields are populated by AuthContextPipe functions registered in your server config.
FrontMcpAuthContext vs Authorization: FrontMcpAuthContext is request-scoped and provides roles, permissions, and scopes from JWT claims. The Authorization interface is transport-scoped and tracks authorized tools, prompts, apps, and provider tokens. Use FrontMcpAuthContext for role/permission checks; use Authorization for tool/app access control.