Repository navigation
Expand file tree
/
Copy pathFacebookAuthenticationOptions.cs
More file actions
54 lines (49 loc) · 2 KB
/
Copy pathFacebookAuthenticationOptions.cs
File metadata and controls
54 lines (49 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// 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 Microsoft.AspNet.Http;
using Microsoft.AspNet.Authentication.OAuth;
namespace Microsoft.AspNet.Authentication.Facebook
{
/// <summary>
/// Configuration options for <see cref="FacebookAuthenticationMiddleware"/>.
/// </summary>
public class FacebookAuthenticationOptions : OAuthAuthenticationOptions<IFacebookAuthenticationNotifications>
{
/// <summary>
/// Initializes a new <see cref="FacebookAuthenticationOptions"/>.
/// </summary>
public FacebookAuthenticationOptions()
{
AuthenticationScheme = FacebookAuthenticationDefaults.AuthenticationScheme;
Caption = AuthenticationScheme;
CallbackPath = new PathString("/signin-facebook");
SendAppSecretProof = true;
AuthorizationEndpoint = FacebookAuthenticationDefaults.AuthorizationEndpoint;
TokenEndpoint = FacebookAuthenticationDefaults.TokenEndpoint;
UserInformationEndpoint = FacebookAuthenticationDefaults.UserInformationEndpoint;
}
// Facebook uses a non-standard term for this field.
/// <summary>
/// Gets or sets the Facebook-assigned appId.
/// </summary>
public string AppId
{
get { return ClientId; }
set { ClientId = value; }
}
// Facebook uses a non-standard term for this field.
/// <summary>
/// Gets or sets the Facebook-assigned app secret.
/// </summary>
public string AppSecret
{
get { return ClientSecret; }
set { ClientSecret = value; }
}
/// <summary>
/// Gets or sets if the appsecret_proof should be generated and sent with Facebook API calls.
/// This is enabled by default.
/// </summary>
public bool SendAppSecretProof { get; set; }
}
}