Skip to content

Commit bb88391

Browse files
authored
Merge pull request #14 from code0-tech/8-document-provider-configurations
add provider configuration documentation
2 parents f71fccf + 37e8ad1 commit bb88391

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
@@ -93,4 +93,43 @@ def fetch_configuration
9393
}
9494
end
9595

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

0 commit comments

Comments
 (0)