// 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.Facebook; using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Builder { /// /// Extension methods for using . /// public static class FacebookAppBuilderExtensions { /// /// Authenticate users using Facebook. /// /// The passed to the configure method. /// The updated . public static IApplicationBuilder UseFacebookAuthentication([NotNull] this IApplicationBuilder app, [NotNull] FacebookOptions options) { return app.UseMiddleware(options); } /// /// Authenticate users using Facebook. /// /// The passed to the configure method. /// Configures the options. /// The updated . public static IApplicationBuilder UseFacebookAuthentication([NotNull] this IApplicationBuilder app, Action configureOptions) { var options = new FacebookOptions(); if (configureOptions != null) { configureOptions(options); } return app.UseFacebookAuthentication(options); } } }