mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-17 20:17:03 +02:00
Add Nextcloud provider (#179)
This commit is contained in:
@@ -19,6 +19,7 @@ Valid providers are :
|
||||
- [GitLab](#gitlab-auth-provider)
|
||||
- [LinkedIn](#linkedin-auth-provider)
|
||||
- [login.gov](#logingov-provider)
|
||||
- [Nextcloud](#nextcloud-provider)
|
||||
|
||||
The provider can be selected using the `provider` configuration value.
|
||||
|
||||
@@ -289,6 +290,32 @@ In this case, you can set the `-skip-oidc-discovery` option, and supply those re
|
||||
-email-domain example.com
|
||||
```
|
||||
|
||||
### Nextcloud Provider
|
||||
|
||||
The Nextcloud provider allows you to authenticate against users in your
|
||||
Nextcloud instance.
|
||||
|
||||
When you are using the Nextcloud provider, you must specify the urls via
|
||||
configuration, environment variable, or command line argument. Depending
|
||||
on whether your Nextcloud instance is using pretty urls your urls may be of the
|
||||
form `/index.php/apps/oauth2/*` or `/apps/oauth2/*`.
|
||||
|
||||
Refer to the [OAuth2
|
||||
documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/oauth2.html)
|
||||
to setup the client id and client secret. Your "Redirection URI" will be
|
||||
`https://internalapp.yourcompany.com/oauth2/callback`.
|
||||
|
||||
```
|
||||
-provider nextcloud
|
||||
-client-id <from nextcloud admin>
|
||||
-client-secret <from nextcloud admin>
|
||||
-login-url="<your nextcloud url>/index.php/apps/oauth2/authorize"
|
||||
-redeem-url="<your nextcloud url>/index.php/apps/oauth2/api/v1/token"
|
||||
-validate-url="<your nextcloud url>/ocs/v2.php/cloud/user?format=json"
|
||||
```
|
||||
|
||||
Note: in *all* cases the validate-url will *not* have the `index.php`.
|
||||
|
||||
## Email Authentication
|
||||
|
||||
To authorize by email domain use `--email-domain=yourcompany.com`. To authorize individual email addresses use `--authenticated-emails-file=/path/to/file` with one email per line. To authorize all email addresses use `--email-domain=*`.
|
||||
|
||||
Reference in New Issue
Block a user