-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathappsettings.json
More file actions
37 lines (37 loc) · 1.52 KB
/
appsettings.json
File metadata and controls
37 lines (37 loc) · 1.52 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
{
"Authentication": {
"DefaultScheme": "Basic", // Optional
"Basic": {
"SchemeName": "Basic", // Default: Basic
// You can set a fixed user name and password for authentication. If you have a single credential, you can just use the plain properties:
//"NameClaimType": "user_name", // Default: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name
//"RoleClaimType": "user_role", // Default: http://schemas.microsoft.com/ws/2008/06/identity/claims/role
"UserName": "marco",
"Password": "P@$$w0rd",
"Roles": [ "Administrator" ],
// Otherwise, you can create an array of Credentials:
"Credentials": [
{
"UserName": "alice",
"Password": "Password1",
"Roles": [ "Administrator", "User" ]
},
{
"UserName": "bob",
"Password": "Password2",
"Roles": [ "User" ]
}
]
// You can also combine both declarations.
// If, instead, you don't have fixed values for authentication, you can omit all these properties and
// register an IBasicAuthenticationValidator implementation that will be used to validate the credentials.
}
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}