Skip to content

Commit

Permalink
[skip ci] Corrections to the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
texpert committed Sep 8, 2016
1 parent 3e829c9 commit ec9a136
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ end
* [add_version](#add_version)
* [doc_version](#doc_version)
* [markdown](#markdown)
* [endpoint_auth_wrapper](#endpoint_auth_wrapper)
* [swagger_endpoint_guard](#swagger_endpoint_guard)
* [oauth_token](#oauth_token)
* [security_definitions](#security_definitions)
* [models](#models)
* [hide_documentation_path](#hide_documentation_path)
Expand Down Expand Up @@ -805,7 +808,7 @@ The Swagger UI on Grape could be secured from unauthorized access using any midd
Below are some examples of securing the Swagger UI on Grape installed along with Ruby on Rails:
- The examples are showing WineBouncer with Doorkeeper;
- The WineBouncer and Doorkeeper gems are used in the examples;
- 'rails' and 'wine_bouncer' gems should be required prior to 'grape-swagger' in boot.rb;
- This works with a fresh PR to WineBouncer which is yet unmerged - [WineBouncer PR](https://github.com/antek-drzewiecki/wine_bouncer/pull/64).
Expand Down Expand Up @@ -846,7 +849,7 @@ Further on, the guard could be used, where necessary, for endpoint access protec
```

And, finally, if you want to not only restrict the access, but to completely hide the endpoint from unauthorized
users, you could use pass a lambda to the :hidden key of a endpoint's description:
users, you could pass a lambda to the :hidden key of a endpoint's description:
```ruby
not_admins = lambda { |token=nil| token.nil? || !User.find(token.resource_owner_id).admin? }
Expand Down

0 comments on commit ec9a136

Please sign in to comment.