Comments (7)
You still need to have an [Authorize] attribute on your Web APIs (or as a global filter).
from identityserver3.accesstokenvalidation.
yep, have that in all cases, but honestly I'm not 100% sure I understand why I would need that. Is it the case that UseIdentityServerBearerTokenAuthentication is saying "when authentication is required, make sure the token contains this scope?" and that is why the request continues so that the [Authorize] attribute can be evaluated?
from identityserver3.accesstokenvalidation.
Authentication happens first. Authorization is the job of the application layer (typically).
from identityserver3.accesstokenvalidation.
oh. duh! so if I want to force Authentication for all requests, I'd need to use an Authentication filter in addition to UseIdentityServerBearerTokenAuthentication (which is part of authorization)?
from identityserver3.accesstokenvalidation.
You mean authorization, right? The bearer token is authentication. If that works, then great, but if not then the request is anonymous. Authorization ensures that the current request is allowed. If anonymous is not allowed, then that authorization is required.
from identityserver3.accesstokenvalidation.
The scope is only enforced when a valid token has been found. Otherwise the request is anonymous.
You need additional authZ rules - in any case.
from identityserver3.accesstokenvalidation.
@brockallen that isn't what I meant, but it's clear now. This all comes down to one of my injected services that depends on an authenticated user. Now that I understand this process better I can handle the unauthenticated use case. I was thinking the UseIdentityServerBearerTokenAuthentication method would prevent the request getting all the way down the pipeline but I get it now.
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.