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

Make endpoint and helpers available in auth blocks #531

Closed
wants to merge 6 commits into from

Conversation

joelvh
Copy link
Contributor

@joelvh joelvh commented Dec 9, 2013

These updates make the endpoint instance the context (or "self") for auth blocks such as Basic Authentication and Digest Authentication. It also extends the instance earlier to make helper methods available to Rack middleware. This allows us to authenticate and store info related to authentication as part of the request (e.g. instance variables or environment variables).

@dblock
Copy link
Member

dblock commented Dec 10, 2013

I like this change. It addresses a number of things that Grape cannot do today, therefore those need to be implemented in tests. Write one for every single thing the change is fixing please. Also do update CHANGELOG.

@joelvh
Copy link
Contributor Author

joelvh commented Dec 12, 2013

@dblock I added some tests that demonstrate the scope of what the basic authentication block has access to.

@dblock
Copy link
Member

dblock commented Dec 12, 2013

Thanks, merged via e23069a.

@dblock dblock closed this Dec 12, 2013
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.

2 participants