Comments (8)
Actually, pyramid_contextauth is context class based but we can easily implement inheritance based auth, can't we?
from pyramid_contextauth.
Yes, I think so :)
We may need to do something smarter than just isinstance, as we’ll want interfaces and subclasses to work, but the design of contextauth does not conflict with traversal.
from pyramid_contextauth.
Ah I remember now what problem I saw. In our apps that use dispatch, we define custom context factories in order to 1) delegate actual auth to them 2) access some stuff on the context instance, like facebook_data or order_info.
In a traversal-based app, we have resources as contexts, so we won’t be able to use context factories to parse the auth bits in the request.
I still think that having custom security contexts (distinct from resource contexts) is a good thing, we just need to find a way to attach them to the resource or request.
from pyramid_contextauth.
Why won't we able to use context factories to parse the auth bits in the request?
from pyramid_contextauth.
Passing factory=SomeSecurityContext with route dispatch changes the root resource used for that view. With traversal, we’re not using routes and we’re not overriding the root resource for some views, because our contexts are resources.
from pyramid_contextauth.
I still do not get it: We can register an authentication policy for a resource/context and run authentication for any request on the resource, right?
from pyramid_contextauth.
You’re right :)
from pyramid_contextauth.
My mistake was thinking that authz was done before traversal.
from pyramid_contextauth.
Related Issues (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 pyramid_contextauth.