// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNet.Security.MicrosoftAccount;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.OptionsModel;
using System;
namespace Microsoft.AspNet.Builder
{
///
/// Extension methods for using
///
public static class MicrosoftAccountAuthenticationExtensions
{
public static IServiceCollection ConfigureMicrosoftAccountAuthentication([NotNull] this IServiceCollection services, [NotNull] Action configure)
{
return services.Configure(configure);
}
public static IApplicationBuilder UseMicrosoftAccountAuthentication([NotNull] this IApplicationBuilder app, Action configureOptions = null, string optionsName = "")
{
return app.UseMiddleware(
new ConfigureOptions(configureOptions ?? (o => { }))
{
Name = optionsName
});
}
}
}