Skip to content

Commit a5cd954

Browse files
committed
add provider configuration documentation
1 parent 4fe67cc commit a5cd954

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,43 @@ def fetch_configuration
9191
}
9292
end
9393

94-
```
94+
```
95+
96+
# Configuration
97+
98+
As you already know, we allow / require to pass in a configuration. Here are all avaiable configuration keys:
99+
100+
101+
## Oauth Based:
102+
Here is the updated table where each key in the JSON (`identifier`, `username`, etc.) is explicitly labeled:
103+
104+
| Name | Description | Default |
105+
|------------------------------------|--------------------------------------------------------------------------------------------|-----------------------------------------------------|
106+
| `client_id` | The client id of the application (needs to be set) | **(no default specified)** |
107+
| `client_secret` | The client secret of the application (needs to be set) | **(no default specified)** |
108+
| `redirect_uri` | The redirect URL of the application (needs to be set) | **(no default specified)** |
109+
| `provider_name` | The provider name (not necessarily) | depends on the provider (e.g., `discord`, `github`) |
110+
| `user_details_url` | The user details URL to gather user information (only for OIDC) | **(no default specified)** |
111+
| `authorization_url` | The URL which the user has to access to authorize (only for OIDC) | **(no default specified)** |
112+
| `attribute_statements` | The keys which the response of the user details has (id, name, email, ...) (only for OIDC) | `{}` (see below for more) |
113+
| `attribute_statements.identifier` | The identifier of the user to identify (only for OIDC) | `["id", "sub", "identifier"]` |
114+
| `attribute_statements.username` | The username of the user (only for OIDC) | `["username", "name", "login"]` |
115+
| `attribute_statements.email` | The email address of the user (only for OIDC) | `["email", "mail"]` |
116+
| `attribute_statements.firstname` | The first name of the user (only for OIDC) | `["first_name", "firstname", ...]` |
117+
| `attribute_statements.lastname` | The last name of the user (only for OIDC) | `["last_name", "lastname", ...]` |
118+
119+
## SAML
120+
121+
| Name | Description | Default |
122+
|----------------------------------|------------------------------------------------------------------------------------------------------------|------------------------------------|
123+
| `provider_name` | The provider name (not necessarily) | `saml` |
124+
| `attribute_statements` | The keys which the response of the user details has (id, name, email, ...) (only for OIDC) | `{}` (see below for more) |
125+
| `attribute_statements.username` | The username of the user | `["username", "name", ...]` |
126+
| `attribute_statements.email` | The email address of the user | `["email", "mail", ...]` |
127+
| `attribute_statements.firstname` | The first name of the user | `["first_name", "firstname", ...]` |
128+
| `attribute_statements.lastname` | The last name of the user | `["last_name", "lastname", ...]` |
129+
| `settings` | The settings to configure the saml response/requests (see https://github.com/SAML-Toolkits/ruby-saml) | `{}` |
130+
| `response_settings` | The response settings to disable some checks if you want (see https://github.com/SAML-Toolkits/ruby-saml) | `{}` |
131+
| `metadata_url` | The metadata url to fetch the metadatas (replacement for `settings`) | **(no default specified)** |
132+
133+

0 commit comments

Comments
 (0)