Content
View differences
Updated by Sajan Gurung 16 days ago
Nextcloud OAuth client is created all the time with the integration setup request. OAuth client creation is not required for the OIDC auth method.
POST `/setup` {...}
<br>
### Test Steps
1. OAuth setup
```bash
curl -XPOST 'http://{nc-server}/index.php/apps/integration_openproject/setup' \
-H'Content-Type: application/json' \
-d'{
"values":{
"openproject_instance_url": "http://op-host",
"openproject_client_id": "client-id",
"openproject_client_secret": "client-secret",
"setup_project_folder": false,
"setup_app_password": false,
"default_enable_navigation": false,
"default_enable_unified_search": false
}
}' \
-u admin:admin
```
Check the following response:
```text
{
"status": ...
"nextcloud_oauth_client_name": ...
"openproject_redirect_uri": ...
"nextcloud_client_id": ...
"nextcloud_client_secret": ...
}
```
2\. OIDC setup
```bash
curl -XPOST 'http://{nc-server}/index.php/apps/integration_openproject/setup' \
-H'Content-Type: application/json' \
-d'{
"values":{
"openproject_instance_url": "http://op-host",
"authorization_method": "oidc",
"sso_provider_type": "external",
"oidc_provider": "Keycloak",
"token_exchange": false,
"setup_project_folder": false,
"setup_app_password": false,
"default_enable_navigation": false,
"default_enable_unified_search": false
}
}' \
-u admin:admin
```
Check the following response:
```text
{
"status": ...
}
```
POST `/setup` {...}
<br>
### Test Steps
1. OAuth setup
```bash
curl -XPOST 'http://{nc-server}/index.php/apps/integration_openproject/setup' \
-H'Content-Type: application/json' \
-d'{
"values":{
"openproject_instance_url": "http://op-host",
"openproject_client_id": "client-id",
"openproject_client_secret": "client-secret",
"setup_project_folder": false,
"setup_app_password": false,
"default_enable_navigation": false,
"default_enable_unified_search": false
}
}' \
-u admin:admin
```
Check the following response:
```text
{
"status": ...
"nextcloud_oauth_client_name": ...
"openproject_redirect_uri": ...
"nextcloud_client_id": ...
"nextcloud_client_secret": ...
}
```
2\. OIDC setup
```bash
curl -XPOST 'http://{nc-server}/index.php/apps/integration_openproject/setup' \
-H'Content-Type: application/json' \
-d'{
"values":{
"openproject_instance_url": "http://op-host",
"authorization_method": "oidc",
"sso_provider_type": "external",
"oidc_provider": "Keycloak",
"token_exchange": false,
"setup_project_folder": false,
"setup_app_password": false,
"default_enable_navigation": false,
"default_enable_unified_search": false
}
}' \
-u admin:admin
```
Check the following response:
```text
{
"status": ...
}
```