This repository has been archived by the owner on Dec 20, 2018. It is now read-only.
/
AzureAdB2COptions.cs
88 lines (72 loc) · 3.12 KB
/
AzureAdB2COptions.cs
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// 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.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI
{
/// <summary>
/// Options for configuring authentication using Azure Active Directory B2C.
/// </summary>
public class AzureADB2COptions
{
/// <summary>
/// Gets or sets the OpenID Connect authentication scheme to use for authentication with this instance
/// of Azure Active Directory B2C authentication.
/// </summary>
public string OpenIdConnectSchemeName { get; set; } = OpenIdConnectDefaults.AuthenticationScheme;
/// <summary>
/// Gets or sets the Cookie authentication scheme to use for sign in with this instance of
/// Azure Active Directory B2C authentication.
/// </summary>
public string CookieSchemeName { get; set; } = CookieAuthenticationDefaults.AuthenticationScheme;
/// <summary>
/// Gets or sets the Jwt bearer authentication scheme to use for validating access tokens for this
/// instance of Azure Active Directory B2C Bearer authentication.
/// </summary>
public string JwtBearerSchemeName { get; internal set; }
/// <summary>
/// Gets or sets the client Id.
/// </summary>
public string ClientId { get; set; }
/// <summary>
/// Gets or sets the client secret.
/// </summary>
public string ClientSecret { get; set; }
/// <summary>
/// Gets or sets the Azure Active Directory B2C instance.
/// </summary>
public string Instance { get; set; }
/// <summary>
/// Gets or sets the domain of the Azure Active Directory B2C tennant.
/// </summary>
public string Domain { get; set; }
/// <summary>
/// Gets or sets the edit profile policy name.
/// </summary>
public string EditProfilePolicyId { get; set; }
/// <summary>
/// Gets or sets the sign up or sign in policy name.
/// </summary>
public string SignUpSignInPolicyId { get; set; }
/// <summary>
/// Gets or sets the reset password policy id.
/// </summary>
public string ResetPasswordPolicyId { get; set; }
/// <summary>
/// Gets or sets the sign in callback path.
/// </summary>
public string CallbackPath { get; set; }
/// <summary>
/// Gets or sets the sign out callback path.
/// </summary>
public string SignedOutCallbackPath { get; set; }
/// <summary>
/// Gets or sets the default policy.
/// </summary>
public string DefaultPolicy => SignUpSignInPolicyId;
/// <summary>
/// Gets all the underlying authentication schemes.
/// </summary>
public string[] AllSchemes => new[] { CookieSchemeName, OpenIdConnectSchemeName };
}
}