aspnetcore/src/Microsoft.AspNet.Authentica.../OpenIdConnectServiceCollect...

27 lines
1.0 KiB
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Authentication.OpenIdConnect;
using Microsoft.Framework.Configuration;
using Microsoft.Framework.Internal;
namespace Microsoft.Framework.DependencyInjection
{
/// <summary>
/// Extension methods to configure OpenIdConnect authentication options
/// </summary>
public static class OpenIdConnectServiceCollectionExtensions
{
public static IServiceCollection AddOpenIdConnectAuthentication([NotNull] this IServiceCollection services, [NotNull] Action<OpenIdConnectOptions> configure)
{
return services.Configure(configure);
}
public static IServiceCollection AddOpenIdConnectAuthentication([NotNull] this IServiceCollection services, [NotNull] IConfiguration config)
{
return services.Configure<OpenIdConnectOptions>(config);
}
}
}