Comments (6)
It's now UseIdentityServerBearerTokenAuthentication
. See this:
from identityserver3.accesstokenvalidation.
Thanks Brock, so this class now encapsulates the jwt and reference token configurators? How do we now set up the signing certificates? Is there a more complete example of how to use this class? Thanks
from identityserver3.accesstokenvalidation.
Yes. The mode property configures if token validation is done locally as a jwt or if requests are made back to identity server to validate the token.
from identityserver3.accesstokenvalidation.
You set it using the standard TokenValidationParameters now. Why do you want so set it explicitly?
from identityserver3.accesstokenvalidation.
It's not that I want to set it explicitly, just trying to understand the new structure, how it works and how it's used, along with the parallels with the previous way of doing it.
from identityserver3.accesstokenvalidation.
I had a working application and after updating to the latest IdSrv and latest AccessTokenValidation I get 401 all the time. There are no errors. All other applications work fine with the latest IdSrv and the version before this commit 04088fb
I did a debug session. Getting metadata works fine. Issuer is there, cert, audiance etc, but when I do a request it just rejects me.
var _configurationManager = new ConfigurationManager("https://idsrv/.well-known/openid-configuration", new HttpClient(new WebRequestHandler()));
var result = _configurationManager.GetConfigurationAsync().Result;
var tokens = from key in result.JsonWebKeySet.Keys
select new X509SecurityToken(new X509Certificate2(Convert.FromBase64String(key.X5c.First())));
This is my configuration:
app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
{
Authority = "https://idsrv",
ValidationMode = ValidationMode.Local,
AuthenticationType = "Bearer"
});
And the token:
{
"client_id": "localclient",
"scope": [
"read",
"write"
],
"iss": "https://idsrv/issuer",
"aud": "https://idsrv/issuer/resources",
"exp": 1418334898,
"nbf": 1418331298
}
One more thing. In one of the debugging sessions I got "invalid bearer token received". Just once...
http://www.symbolsource.org/MyGet/Metadata/aspnetwebstacknightly/Project/Microsoft.Owin.Security.OAuth/2.0.0-rtw2-20821-583-dev/Release/.NETFramework,Version%3Dv4.5/Microsoft.Owin.Security.OAuth/Microsoft.Owin.Security.OAuth/OAuthBearerAuthenticationHandler.cs?ImageName=Microsoft.Owin.Security.OAuth
from identityserver3.accesstokenvalidation.
Related Issues (20)
- Restrict issuer when using discovery document HOT 1
- Access token validation gives no indication when a token has failed HOT 1
- How to debug/trace if validation fails
- Unexpected file version of IdentityServer3.AccessTokenValidation involved in build warning HOT 2
- NotImplemented exception on Mono HOT 1
- Performance issues with ValidationMode.Local HOT 6
- Access token validation with legacy IIS hosted web API
- Customize Error Handling for HTTP Calls.
- Add UserInfo claims to User.Claims HOT 4
- 401 While using IdentityServer and the protected WebApi in the same app
- 2.15 causes deadlocks/hangs under heavy load HOT 10
- Adding option for configuring IntrospectionEndpoint
- Web Api with IS3 authenticate with IS4 Server HOT 2
- AccessTokenValidation - HTTPClient Socket connection timeouts HOT 1
- Set AccessToken Validation on a .net wepapi 2 with Identity server 4 HOT 1
- TypeLoadException when we use Microsoft.Owin 4 HOT 5
- Strict dependency on IdentityModel (>= 1.9.2 && < 2.0.0) makes upgrade to IdentityModel 2.12.0 not possible
- Define multiple issuers in TokenValidationParameters
- Sending JWT token to resource server - permission denied HOT 10
- How to know Identity server is down using app.UseIdentityServerBearerTokenAuthentication( New IdentityServerBearerTokenAuthenticationOptions() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identityserver3.accesstokenvalidation.