This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
forked from research-software-directory/RSD-as-a-service
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'v1.10.0' into 79-update_1.10.0
- Loading branch information
Showing
45 changed files
with
577 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all) | ||
SPDX-FileCopyrightText: 2022 Ewan Cahen (Netherlands eScience Center) <[email protected]> | ||
SPDX-FileCopyrightText: 2022 Netherlands eScience Center | ||
SPDX-FileCopyrightText: 2022 dv4all | ||
SPDX-License-Identifier: CC-BY-4.0 | ||
--> | ||
|
||
# Authentication module | ||
|
||
This modules handles authentication from third parties using oAuth2 and OpenID. | ||
This module handles authentication from third parties using oAuth2 and OpenID. | ||
|
||
## Environment variables | ||
Check `.env.example` to see which environment variables are needed. | ||
|
||
## Developing locally | ||
If you want to develop and run the auth module locally, i.e. outside of Docker, you have to make two changes to files tracked by Git. | ||
1. In `docker-compose.yml`, add the following lines to the `nginx` service: | ||
```yml | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
``` | ||
2. In `nginx.conf`, replace `server auth:7000;` with `server host.docker.internal:7000;` | ||
|
||
It requires the following variables at run time. | ||
|
||
```env | ||
# connection to backend | ||
POSTGREST_URL= | ||
# SURFconext | ||
NEXT_PUBLIC_SURFCONEXT_CLIENT_ID= | ||
NEXT_PUBLIC_SURFCONEXT_REDIRECT= | ||
AUTH_SURFCONEXT_CLIENT_SECRET= | ||
Remember to undo these changes before committing! | ||
|
||
# JWT secret for postgREST | ||
PGRST_JWT_SECRET= | ||
``` | ||
It is recommended to use the [envFile plugin](https://plugins.jetbrains.com/plugin/7861-envfile) of IntelliJ IDEA to load your `.env` file. | ||
Furthermore, set the value of `POSTGREST_URL` to `http://localhost/api/v1`. | ||
|
||
## Running the tests | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.