Class BowireAuthProviderRegistry
- Namespace
- Kuestenlogik.Bowire.Auth
- Assembly
- Kuestenlogik.Bowire.dll
Assembly-scan registry for IBowireAuthProvider implementations — mirrors BowireProtocolRegistry. At most one provider is active per process; selection happens via ProviderId.
public static class BowireAuthProviderRegistry
- Inheritance
-
BowireAuthProviderRegistry
- Inherited Members
Remarks
Auth providers are loaded the same way protocol plugins are:
assembly-scan over Kuestenlogik.Bowire* in the current
AppDomain. Sibling plugins under
~/.bowire/plugins/ land there too (via
BowirePluginHost), so a standalone install only needs
bowire plugin install Kuestenlogik.Bowire.Auth.Oidc to make
OIDC selectable.
At-most-one is by design: mixing two auth schemes on the same set
of endpoints invites confusion and conflicting HttpContext.User
resolution. Operators that need fallback schemes can wire them
inside a single provider (e.g. an "oidc+apikey" provider that
accepts either).
Methods
ApplyAuthentication(IServiceCollection, IConfiguration, BowireAuthOptions, ILogger?)
Apply the selected provider to the host. Called from
AddBowireAuth after the provider id has been resolved
from BowireAuthOptions + configuration.
public static IBowireAuthProvider? ApplyAuthentication(IServiceCollection services, IConfiguration configuration, BowireAuthOptions options, ILogger? logger = null)
Parameters
servicesIServiceCollectionconfigurationIConfigurationoptionsBowireAuthOptionsloggerILogger
Returns
- IBowireAuthProvider
The active provider, or
nullwhen no provider is selected (the laptop-friendly default).
Discover(ILogger?)
Walk CurrentDomain for IBowireAuthProvider implementations and return them keyed by Id.
public static IReadOnlyDictionary<string, IBowireAuthProvider> Discover(ILogger? logger = null)
Parameters
loggerILogger