Are you an LLM? You can read better optimized documentation at /api/security/passport/types/interfaces/interface-protocol-options.md for this page in Markdown format
ProtocolOptions
@tsed/passport
Usage
typescript
import { ProtocolOptions } from "@tsed/passport";See /packages/security/passport/src/interfaces/ProtocolOptions.ts.
Overview
ts
interface ProtocolOptions<Settings = any> {
name: string;
useStrategy: Type<Strategy>;
settings: Settings;
loginOnly?: boolean;
}name
ts
name: string;useStrategy
ts
useStrategy: Type<Strategy>;settings
ts
settings: Settings;loginOnly
ts
loginOnly?: boolean;Run the strategy only on login endpoints decorated with @Authenticate().
A route decorated with @Authorize() then accepts this protocol only through the session it established, and never runs the strategy itself. Use it for interactive login strategies (passport-local, OAuth, ...) so that credentials sent to a business route do not open a new login flow.