MCPcopy
hub / github.com/directus/directus / getAuthProvider

Function getAuthProvider

api/src/auth.ts:21–30  ·  view source on GitHub ↗
(provider: string)

Source from the content-addressed store, hash-verified

19const providers: Map<string, AuthDriver> = new Map();
20
21export function getAuthProvider(provider: string): AuthDriver {
22 const logger = useLogger();
23
24 if (!providers.has(provider)) {
25 logger.error('Auth provider not configured');
26 throw new InvalidProviderConfigError({ provider });
27 }
28
29 return providers.get(provider)!;
30}
31
32export async function registerAuthProviders(): Promise<void> {
33 const env = useEnv();

Callers 7

createSAMLAuthRouterFunction · 0.85
createOpenIDAuthRouterFunction · 0.85
createOAuth2AuthRouterFunction · 0.85
loginMethod · 0.85
refreshMethod · 0.85
logoutMethod · 0.85
verifyPasswordMethod · 0.85

Calls 3

useLoggerFunction · 0.85
hasMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected