2
2
using Microsoft . IdentityModel . Protocols ;
3
3
using Microsoft . Owin . Security ;
4
4
using Microsoft . Owin . Security . Cookies ;
5
- using Microsoft . Owin . Security . OpenIdConnect ;
6
5
using Microsoft . Owin . Security . Notifications ;
7
-
6
+ using Microsoft . Owin . Security . OpenIdConnect ;
8
7
using Owin ;
9
-
10
8
using System ;
11
9
using System . Configuration ;
10
+ using System . IdentityModel . Claims ;
12
11
using System . IdentityModel . Tokens ;
13
12
using System . Threading . Tasks ;
14
13
using System . Web ;
15
- using System . IdentityModel . Claims ;
16
-
17
14
using TaskWebApp . Models ;
18
15
19
16
namespace TaskWebApp
20
17
{
21
- public partial class Startup
22
- {
18
+ public partial class Startup
19
+ {
23
20
// App config settings
24
21
public static string ClientId = ConfigurationManager . AppSettings [ "ida:ClientId" ] ;
25
22
public static string ClientSecret = ConfigurationManager . AppSettings [ "ida:ClientSecret" ] ;
@@ -39,7 +36,7 @@ public partial class Startup
39
36
public static string ApiIdentifier = ConfigurationManager . AppSettings [ "api:ApiIdentifier" ] ;
40
37
public static string ReadTasksScope = ApiIdentifier + ConfigurationManager . AppSettings [ "api:ReadScope" ] ;
41
38
public static string WriteTasksScope = ApiIdentifier + ConfigurationManager . AppSettings [ "api:WriteScope" ] ;
42
- public static string [ ] Scopes = new string [ ] { ReadTasksScope , WriteTasksScope } ;
39
+ public static string [ ] Scopes = new string [ ] { ReadTasksScope , WriteTasksScope } ;
43
40
44
41
// OWIN auth middleware constants
45
42
public const string ObjectIdElement = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" ;
@@ -75,7 +72,7 @@ public void ConfigureAuth(IAppBuilder app)
75
72
AuthenticationFailed = OnAuthenticationFailed ,
76
73
} ,
77
74
78
- // Specify the claims to validate
75
+ // Specify the claim type that specifies the Name property.
79
76
TokenValidationParameters = new TokenValidationParameters
80
77
{
81
78
NameClaimType = "name"
0 commit comments