MCPcopy Create free account
hub / github.com/authorizerdev/authorizer / New

Function New

internal/authenticators/providers.go:30–39  ·  view source on GitHub ↗

New returns a new authenticators provider

(cfg *config.Config, deps *Dependencies)

Source from the content-addressed store, hash-verified

28
29// New returns a new authenticators provider
30func New(cfg *config.Config, deps *Dependencies) (Provider, error) {
31 if !cfg.EnableTOTPLogin {
32 return nil, nil
33 }
34 return totp.NewProvider(&totp.Dependencies{
35 Log: deps.Log,
36 StorageProvider: deps.StorageProvider,
37 EncryptionKey: cfg.JWTSecret,
38 })
39}

Callers 4

initFGATestSetupFunction · 0.92
initTestSetupFunction · 0.92
runRootFunction · 0.92
runMCPFunction · 0.92

Calls 1

NewProviderFunction · 0.92

Tested by 1

initFGATestSetupFunction · 0.74