Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Commit d2c23d9

Browse files
author
Riley Mathews
authored
Update configuration documentation (jjbohn#53)
* added table for options information * added table for client options configuration
1 parent d6c2f22 commit d2c23d9

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,44 @@ config.omniauth :openid_connect, {
4444
}
4545
```
4646

47-
Configuration details:
47+
### Options Overview
48+
49+
| Field | Description | Required | Default | Example/Options |
50+
|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|----------------------------|-----------------------------------------------------|
51+
| name | Arbitrary string to identify connection and identify it from other openid_connect providers | no | String: openid_connect | :my_idp |
52+
| issuer | Root url for the authorization server | yes | | https://myprovider.com |
53+
| discovery | Should OpenID discovery be used. This is recommended if the IDP provides a discovery endpoint. See client config for how to manually enter discovered values. | no | false | one of: true, false |
54+
| client_auth_method | Which authentication method to use to authenticate your app with the authorization server | no | Sym: basic | "basic", "jwks" |
55+
| scope | Which OpenID scopes to include (:openid is always required) | no | Array<sym> [:openid] | [:openid, :profile, :email] |
56+
| response_type | Which OAuth2 response type to use with the authorization request | no | String: code | one of: 'code', 'id_token' |
57+
| state | A value to be used for the OAuth2 state parameter on the authorization request. Can be a proc that generates a string. | no | Random 16 character string | Proc.new { SecureRandom.hex(32) } |
58+
| response_mode | The response mode per [spec](https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html) | no | nil | one of: :query, :fragment, :form_post, :web_message |
59+
| display | An optional parameter to the authorization request to determine how the authorization and consent page | no | nil | one of: :page, :popup, :touch, :wap |
60+
| prompt | An optional parameter to the authrization request to determine what pages the user will be shown | no | nil | one of: :none, :login, :consent, :select_account |
61+
| send_scope_to_token_endpoint | Should the scope parameter be sent to the authorization token endpoint? | no | true | one of: true, false |
62+
| post_logout_redirect_uri | The logout redirect uri to use per the [session management draft](https://openid.net/specs/openid-connect-session-1_0.html) | no | empty | https://myapp.com/logout/callback |
63+
| uid_field | The field of the user info response to be used as a unique id | no | 'sub' | "sub", "preferred_username" |
64+
| client_options | A hash of client options detailed in its own section | yes | | |
65+
66+
### Client Config Options
67+
68+
These are the configuration options for the client_options hash of the configuration.
69+
70+
| Field | Description | Default | Replaced by discovery? |
71+
|------------------------|-----------------------------------------------------------------|------------|------------------------|
72+
| identifier | The OAuth2 client_id | | |
73+
| secret | The OAuth2 client secret | | |
74+
| redirect_uri | The OAuth2 authorization callback url in your app | | |
75+
| scheme | The http scheme to use | https | |
76+
| host | The host of the authorization server | nil | |
77+
| port | The port for the authorization server | 443 | |
78+
| authorization_endpoint | The authorize endpoint on the authorization server | /authorize | yes |
79+
| token_endpoint | The token endpoint on the authorization server | /token | yes |
80+
| userinfo_endpoint | The user info endpoint on the authorization server | /userinfo | yes |
81+
| jwks_uri | The jwks_uri on the authorization server | /jwk | yes |
82+
| end_session_endpoint | The url to call to log the user out at the authorization server | nil | yes |
83+
84+
### Additional Configuration Notes
4885
* `name` is arbitrary, I recommend using the name of your provider. The name
4986
configuration exists because you could be using multiple OpenID Connect
5087
providers in a single app.

0 commit comments

Comments
 (0)