Authenticating
Last updated
Was this helpful?
Last updated
Was this helpful?
To start using the Janus administration API you need to get a and provide it in every single request using the Authorization
header.
You can choose to log in with either github
or basic
providers.
To login with Github, you need to send a valid Github access token in the Authorization header. This token will be exchanged for a JWT that you can use to make requests to the admin gateway API.
You can choose to either go through the flows to authorize an user on github, or generate a and provide that instead.
Authentication is then performed with the following request:
http -v --json POST localhost:8081/login?provider=github "Authorization:Bearer githubToken"
curl -X "POST" localhost:8081/login?provider=github -H 'Authorization:Bearer githubToken'
You can also configure which organizations/teams will be allowed to log into the Admin API. This can be done with the following :
Alternatively, you can authenticate against the admin API using HTTP Basic
Authentication.
http -v --json POST localhost:8081/login username=admin password=admin
curl -X "POST" localhost:8081/login -d '{"username": "admin", "password": "admin"}' -H "Content-Type: application/json"
The username and password default to admin/admin, and should be changed using the following :