From ec9a13682175267bc52a3f2c2ddd082806a5b0fb Mon Sep 17 00:00:00 2001 From: texpert Date: Thu, 8 Sep 2016 16:15:24 +0300 Subject: [PATCH] [skip ci] Corrections to the README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ce777904..97c5440c 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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). @@ -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? }