Skip to content

Commit bc549ee

Browse files
Merge pull request #6 from andresmoschini/fix
Fix
2 parents 0c6cd1e + 485caaa commit bc549ee

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
os: Visual Studio 2015
22

3-
version: 1.0.2-alpha-{build}
3+
version: 1.0.3-alpha-{build}
44

55
nuget:
66
account_feed: true

global.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"projects": [ "src", "test" ],
33
"sdk": {
4-
"version": "1.0.0-preview2-003131",
5-
"runtime": "clr",
6-
"architecture": "x86"
4+
"version": "1.0.0-preview2-003131"
75
}
86
}

src/MakingSense.AspNetCore.Authentication.SimpleToken/SimpleTokenAppBuilderExtensions.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ public static IApplicationBuilder UseSimpleTokenAuthentication(this IApplication
3838

3939
if (options.SecurityTokenValidatorsFactory == null)
4040
{
41+
// TODO: fix it because it is using app services, and it should use scope services,
42+
// a work around could be:
43+
// ```
44+
// SecurityTokenValidatorsFactory = () =>
45+
// {
46+
// var context = app.ApplicationServices.GetService<IHttpContextAccessor>().HttpContext;
47+
// return context.RequestServices.GetServices<ISecurityTokenValidator>();
48+
// }
49+
// ```
4150
options.SecurityTokenValidatorsFactory = () => app.ApplicationServices.GetServices<ISecurityTokenValidator>();
4251
}
4352

src/MakingSense.AspNetCore.Authentication.SimpleToken/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0.2-alpha-*",
2+
"version": "1.0.3-alpha-*",
33
"description": "MakingSense.AspNetCore.Authentication.SimpleToken Class Library",
44
"authors": [ "MakingSense" ],
55
"packOptions": {
@@ -12,7 +12,7 @@
1212
"licenseUrl": "http://www.gnu.org/licenses/lgpl.html"
1313
},
1414
"dependencies": {
15-
"MakingSense.AspNetCore.Abstractions": "1.0.2-alpha-*",
15+
"MakingSense.AspNetCore.Abstractions": "1.0.3-*",
1616
"Microsoft.AspNetCore.Authentication": "1.0.0",
1717
"Microsoft.IdentityModel.Tokens": "5.0.0",
1818
"Newtonsoft.Json": "9.0.1"

0 commit comments

Comments
 (0)