Add information on how to use it to readme (#16)

master
Humberto 2021-09-24 04:28:39 +01:00 committed by GitHub
parent 68136923dc
commit 8fd1481f52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -25,10 +25,13 @@ Here's a quick example, adding the middleware to a Rails app in `config/initiali
```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
provider :keycloak_openid, 'Example-Client', '19cca35f-dddd-473a-bdd5-03f00d61d884',
client_options: {site: 'https://example.keycloak-url.com', realm: 'example-realm'}
client_options: {site: 'https://example.keycloak-url.com', realm: 'example-realm'},
name: 'keycloak'
end
```
This will allow a POST request to `auth/keycloak`
## Devise Usage
Adapted from [Devise OmniAuth Instructions](https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview)