Skip to content
Snippets Groups Projects
Commit ebdaa2b6 authored by michael.minelli's avatar michael.minelli
Browse files

Merge branch 'v3.0.1' into main

parents 0038cb2c d1f17292
No related branches found
No related tags found
No related merge requests found
Pipeline #26828 passed
# Authentication to the Dojo # Authentication to the Dojo
The authentication is done in two steps: login into the dojo app and into https://gitedu.hesge.ch (through an API token). The authentication is done by the login command:
1. Login into the dojo application:
```bash ```bash
dojo session application login --user <email> dojo session login
``` ```
```console ```console
? Please enter your password [hidden] Please wait while we login you into Dojo...
Please wait while we are logging in you to Dojo... ℹ Login with Gitlab (https://gitedu.hesge.ch/):
✔ Logged in ✔ Login server started
✔ Teaching staff permissions ⠇ Waiting for user to authorize the application in his web browser
✔ Student permissions
``` ```
At this time the cli opens a web browser to the Gitlab login page. Once you are logged in you will be asked to authorize the application to access your account. Click on the `Authorize` button.
2. Register the API token (see below) for Gitlab ![Authorize](../figures/GitlabLogin.png)
```bash
dojo session gitlab login <token> **Note:** If you want to use the cli in a headless environment you can use the `--cli` option. In this case you will be provided with a link to copy/paste in your browser.
```
Once, the authorization is done, the cli will retrieve the Gitlab token and will try to login to the Dojo backend. If everything is ok you will see the following output (the permissions section may differ depending on your account):
```console ```console
Please wait while we are testing your Gitlab token... Please wait while we login you into Dojo...
ℹ Checking Gitlab token: ℹ Login with Gitlab (https://gitedu.hesge.ch/):
✔ Login server started
✔ Login code received
✔ Login server stopped
✔ Gitlab tokens retrieved
ℹ Checking Gitlab token:
✔ Read access ✔ Read access
✔ Write access ✔ Write access
ℹ Login to Dojo backend:
✔ Logged in
ℹ Checking Dojo session:
✔ The session is valid
✔ Student permissions
✔ Teaching staff permissions
✔ Admin permissions
``` ```
The API token can be created by (see <https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html> for more informations):
- Logging into <https://gitedu.hesge.ch>
- **Preferences -> Access Tokens**
- Give a name to your token and a validity
- Tick the **api** box
- Click the **Create personal access token**
3. Test if it is working ## Test if it is working
```bash ```bash
dojo session test dojo session test
``` ```
......
Wiki/figures/GitlabLogin.png

1.03 MiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment