Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include raw http request in requests #24

Merged
merged 2 commits into from
Aug 15, 2014
Merged

Include raw http request in requests #24

merged 2 commits into from
Aug 15, 2014

Conversation

yookoala
Copy link
Contributor

There was no way osin.Storage could obtain the raw http request.

That make it impossible to use osin with GAE datastore or memcache
as storage backend (both requires access to raw http request).
It also limited the potential for storage engine to obtain extra
bits for query purpose.

In this commit, the raw request will be passed in AccessRequest and
AuthorizeRequest struct. Hence Storage interface methods will get it.

There was no way osin.Storage could obtain the raw http request.

That make it impossible to use osin with GAE datastore or memcache
as storage backend (both requires access to raw http request).
It also limited the potential for storage engine to obtain extra
bits for query purpose.

In this commit, the raw request will be passed in AccessRequest and
AuthorizeRequest struct. Hence Storage interface methods will get it.
@yookoala
Copy link
Contributor Author

I wanted to use osin as the auth layer in a project I'm doing. The project would most probably be hosted on GAE. However, all the storage facilities (datastore, memcache) requires to pass in appengine.Context. And to obtain appengine.Context, I need to run the appengine.NewContext with the raw *http.Request.

Please consider this. Thanks.

@RangelReale
Copy link
Contributor

I think it is better if the parameter is named "HttpRequest" instead of "Raw".
Change it and I'll merge.

As discussed in pull request #24, the parameters are renamed from
"Raw" to "HttpRequest".
@yookoala
Copy link
Contributor Author

Renamed!

RangelReale added a commit that referenced this pull request Aug 15, 2014
Include raw http request in requests
@RangelReale RangelReale merged commit e8faddd into openshift:master Aug 15, 2014
@yookoala yookoala deleted the pass_raw_request branch January 3, 2017 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants