Authentication

How to authenticate in the dojo.

The authentication is done by the login command:

dojo auth login
Please wait while we login you into Dojo...
ℹ Login with Gitlab (https://gitedu.hesge.ch/):
    ✔ Login server started
    ⠇ Waiting for user to authorize the application in his web browser

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.

Authorization screenshot from the
Gitedu page.

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):

Please wait while we login you into Dojo...
ℹ Login with Gitlab (https://gitedu.hesge.ch/):
    ✔ Login server started
    ✔ Login code received
    ✔ Login server stopped
    ✔ Gitlab tokens retrieved
ℹ Checking Gitlab token:
    ✔ Read access
    ✔ Write access
ℹ Login to Dojo backend:
    ✔ Logged in
ℹ Checking Dojo auth:
    ✔ The auth is valid
        ✔ Student permissions
        ✔ Teaching staff permissions
        ✔ Admin permissions

Test if authentification worked

dojo auth test
ℹ Checking Dojo auth: 
    ✔ The auth is valid
        ✔ Teaching staff permissions
        ✔ Student permissions
ℹ Checking Gitlab token: 
    ✔ Read access
    ✔ Write access

Good news. You can now use the Dojo!