Skip to content

Commit 1b98228

Browse files
committed
docs: syncing docs and sample
1 parent ec6a841 commit 1b98228

5 files changed

Lines changed: 6 additions & 11 deletions

File tree

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,15 @@ If you want to generate JSON Web Tokens in your application you need to add the
7676
services.AddJwtConfiguration(Configuration).UseNetDevPackIdentity();;
7777
```
7878

79-
>**Note:** If you don't inform the configuration name the value adopted will be _AppJwtSettings_
80-
8179
Set your `appsettings.json` file with this values:
8280

8381
```json
8482
"AppJwtSettings": {
85-
"Expiration": 1,
8683
"Issuer": "https://my-application.com",
8784
"Audience": "MyApplication.Name"
8885
}
8986
```
87+
It's possible to configure some aspects of token
9088

9189
|Key|Meaning|Default
9290
|--|--|---|

src/Samples/AspNetCore.Jwt.Sample/Config/CustomIdentityAndKeyConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static void AddCustomIdentityAndKeyConfiguration(this IServiceCollection
2727
.AddDefaultTokenProviders();
2828

2929
// Ours JWT configuration
30-
services.AddJwtConfiguration(configuration, "AppSettings");
30+
services.AddJwtConfiguration(configuration);
3131
}
3232
}
3333

src/Samples/AspNetCore.Jwt.Sample/Config/CustomIdentityConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static void AddCustomIdentityConfiguration(this IServiceCollection servic
2626
.AddDefaultTokenProviders();
2727

2828
// Ours JWT configuration
29-
services.AddJwtConfiguration(configuration, "AppSettings");
29+
services.AddJwtConfiguration(configuration);
3030
}
3131
}
3232

src/Samples/AspNetCore.Jwt.Sample/Config/DefaultIdentityConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static void AddDefaultIdentityConfiguration(this IServiceCollection servi
1717
services.AddIdentityConfiguration(); // <== This extension returns IdentityBuilder to extends configuration
1818

1919
// Default JWT configuration
20-
services.AddJwtConfiguration(configuration, "AppSettings");
20+
services.AddJwtConfiguration(configuration);
2121
}
2222
}
2323
}

src/Samples/AspNetCore.Jwt.Sample/appsettings.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
},
99
"AllowedHosts": "*",
1010
"AppJwtSettings": {
11-
"Expiration": 1,
12-
"Issuer": "SampleApp",
13-
"Audience": "https://localhost",
14-
"RefreshTokenType": "ReUse",
15-
"RefreshTokenExpiration": 30
11+
"Issuer": "https://netdevpack.net",
12+
"Audience": "SampleApp"
1613
}
1714
}

0 commit comments

Comments
 (0)