Skip to content

Commit c5be417

Browse files
Simplify the example
1 parent e1a54e3 commit c5be417

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ public class Startup
9393
{
9494
options.SecurityTokenValidatorsFactory = () =>
9595
{
96-
var context = services.BuildServiceProvider().GetService<IHttpContextAccessor>().HttpContext;
97-
return context.RequestServices.GetServices<ISecurityTokenValidator>();
96+
return services.BuildServiceProvider().GetServices<ISecurityTokenValidator>();
9897
};
9998
});
10099
}

src/MakingSense.AspNetCore.Authentication.SimpleToken/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ public class Startup
9393
{
9494
options.SecurityTokenValidatorsFactory = () =>
9595
{
96-
var context = services.BuildServiceProvider().GetService<IHttpContextAccessor>().HttpContext;
97-
return context.RequestServices.GetServices<ISecurityTokenValidator>();
96+
return services.BuildServiceProvider().GetServices<ISecurityTokenValidator>();
9897
};
9998
});
10099
}

0 commit comments

Comments
 (0)