public OpenIdConnectRedirectProvider(IMetadataService metadataService, NavigationManager navigationManager, OpenIdConnectMetadataConfigurationOptions options, ITokenProvider tokenProvider) { this.metadataService = metadataService; this.navigationManager = navigationManager; this.options = options; this.tokenProvider = tokenProvider; }
public static IServiceCollection UseOpenIdConnectAuthentication(this IServiceCollection services, string oidcServer, string clientId, string redirectPath, params string[] scopes) { var options = new OpenIdConnectMetadataConfigurationOptions($"{oidcServer}/.well-known/openid-configuration", clientId, redirectPath, scopes); services.AddSingleton(options); services.AddSingleton <IMetadataService, OpenIdConnectMetadataService>(); services.AddSingleton <ITokenProvider, DefaultTokenProvider>(); services.AddSingleton <OpenIdConnectRedirectProvider>(); services.AddScoped <AuthenticationStateProvider, OpenIdConnectAuthenticationStateProvider>(); return(services); }
public OpenIdConnectMetadataService(HttpClient client, OpenIdConnectMetadataConfigurationOptions options) { this.client = client; this.options = options; }