Comments (4)
how are you going to send headers for requesting said user and pass?
remember the realm needs to be changeable
from bulletphp.
The auth challenge might be left up to the user - this would just be to retrieve the supplied username and password from a provided Authorization
header in the current request.
from bulletphp.
I imagine this as a part of a solution that would make it possible to declare conditions on a request, and then either fire up an engine that checks all conditions, or just executing the checks as they occur.
This could be useful for validating forms, file uploads, doing basic and digest auth, oauth token checks, etc.
One way is to write methods of Request that manipulate a description of things to check and then manually call a method ->check() that actually executes stuff. This is fairly simple, and with clever implementation it's easy to decouple the code for checks from the places where they're actually needed. This together with Bullets URL parsing mechanism would leave the code fairly clean and self-explanatory while imposing no overhead whatsoever on those not using the feature.
from bulletphp.
Yeah, I was initially thinking about implementing this as a call-time parsing, so if the $request->user()
or $request->password()
methods were called, THEN it would check for the Authorization
header and do all the parsing - I would not front-load any of this since it's all just in the basic request data anyways.
from bulletphp.
Related Issues (20)
- Query params available from $app->param('key') but not $app->query('key') HOT 3
- Short-circuit path handling? HOT 9
- Default $method = null for App->run() HOT 1
- Bullet doesn't fully support periods in URIs HOT 3
- Response Handlers cannot be overloaded HOT 3
- http://bulletphp.com/ is down... HOT 4
- Enhancement: Catch-all exception handling HOT 2
- 'Method 'Bullet\App::share' not found' HOT 2
- Path "/" not working in subfolder HOT 8
- set template before $request.isMobile() HOT 1
- $request->param('inputfield','default_value') always return default_value HOT 2
- how use different layout under a same route namespace HOT 1
- Set what format when echo image content in route HOT 3
- Add and document large (chunked) response handling HOT 1
- Document running Bullet from a subdirectory of docroot HOT 1
- composer failing to install HOT 2
- may reversal args that $app->response($1,$2) HOT 1
- Use of deprecated function eregi
- Consider dropping php-5.6 and php-7.0 version supports HOT 5
- Support PHP8
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 bulletphp.