Something went wrong. Try again.
Synapse is a study workspace. Organize courses read and annotate the material, train with generated exercises and watch your progress forked from denishovart.com/synapse
Something went wrong. Try again.
12345678910111213141516171819202122232425262728// How an authentication method is described to the frontend.//// Each provider bundles a Passport strategy plus the metadata the frontend// needs to render a login option. Two ship: the `local` provider (username +// password, always registered) and OIDC (configured at runtime, see// oidc.service.ts). A further protocol (SAML, a bespoke OAuth2) is added by// contributing another AuthProviderInfo to the AUTH_PROVIDERS list (see// auth.module.ts) alongside its Passport strategy.//// A provider:// 1. registers a Passport strategy (via PassportStrategy) whose validate()// resolves/creates a User and returns its PublicUser, and// 2. contributes an AuthProviderInfo describing itself for the login UI.//// The strategy's name is what ties the pieces together: the login route// `POST /api/auth/login/:provider` runs AuthGuard(name), and the same name is// stored on the user's `provider` column.export interface AuthProviderInfo { // Stable id, also the Passport strategy name (e.g. 'local', 'oidc'). name: string; // Human label for the login button. label: string; // 'credentials' → the UI shows username/password fields and POSTs them; // 'redirect' → the UI links to GET /api/auth/login/:name to start an // external redirect flow (OIDC/SAML). kind: 'credentials' | 'redirect';}