Comments (2)
There is a rudimentary basic auth middleware, but it's not hooked up to anything. Digest support should be added. Perhaps this could be merged with the WebAuth middleware? Also, how should HTTP authentication be enabled? web.auth = basic,digest? web.auth=http?
from webcore.
For reference, here is the current (untested, unused) basic authentication code:
class BasicAuthMiddleware(object):
def __init__(self, application):
self.application = application
def __call__(self, environ, start_response):
if 'HTTP_AUTHORIZATION' in environ:
authtype, auth = environ['HTTP_AUTHORIZATION'].split()
if authtype.lower() == 'basic':
try:
un, pw = b64decode(auth).split(':')
except TypeError:
return HTTPUnauthorized()
if not web.auth.authenticate(un, pw):
return HTTPUnauthorized()
try:
return self.application(environ, start_response)
except HTTPException, e:
return e(environ, start_response)
This code has been removed from WebCore 1.1.
from webcore.
Related Issues (20)
- Complete coverage for the ACL extension. HOT 1
- Complete coverage for JSON kwarg processing. HOT 1
- Extract WebAssets integration extension into own package. HOT 1
- Complete coverage for base extension breadcrumb list. HOT 1
- Serialization extension. HOT 1
- Transaction management extension. HOT 1
- Complete tests for the static application. HOT 1
- Add "trace" logging level prior to configuration.
- Add ability for extensions to exclude each-other.
- HTTPException instances caught fail to preserve important response headers. HOT 1
- Annotation extension support for use of default value in the event of casting failure.
- Provide an executor to execute futures after response streaming. HOT 1
- Document citation.
- Adapt to verboten direct execution of static methods.
- Misspelled string HOT 1
- Improve usefulness of typecasting failures. HOT 1
- Local value referenced outside of scope. HOT 1
- During initial creation of the placeholder response, clear the content type. HOT 2
- Dispatcher incorrectly handles trailing slashes
- Support the return of Path values for static file delivery.
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 webcore.