Octov0.11.17
Referenceoctopaas CLI

octopaas auth

Sign in, sign out, and see how you are signed in

Sign in to a platform with your browser, the way people should.

auth login finds the platform's identity provider from the API itself, registers octopaas with it, and sends you through its sign-in page. The session is kept in ~/.octopaas/credentials.yaml, per profile, and renews itself.

API keys are for automation: see octopaas help environment.

octopaas auth login

Sign in with your browser, and keep the session in the profile.

octopaas asks the API which identity provider issues its tokens, registers itself there once (dynamic client registration), and opens the sign-in page. When you come back, the session is saved for the profile and renews itself until you sign out.

On a machine without a browser, use --no-browser and open the printed link anywhere that can reach this machine's localhost.

octopaas auth login [flags]

Examples

octopaas auth login
octopaas profile add local --url http://localhost:8095
octopaas auth login --profile local
octopaas auth login --no-browser

Flags

FlagWhat it doesDefault
--no-browserprint the sign-in link instead of opening it
--timeouthow long to wait for you in the browser5m0s

octopaas auth logout

Forget the profile's session on this machine.

The identity provider's own session in your browser is untouched; sign out there too if this is a shared machine.

octopaas auth logout

Examples

octopaas auth logout
octopaas auth logout --profile local

octopaas auth status

Show the platform, the profile and the credential in use, and the account it acts as, with your roles. With an API key, the roles are the ones the key carries that you may still give it, which is all it may do.

It says where each came from (a flag, the environment or the config, or for an environment nobody named, the API key it is bound to), which is the quickest way to find out why octopaas is talking to the platform it is.

octopaas auth status

Examples

octopaas auth status
octopaas auth status -o json | jq -r .user.email
OCTOPAAS_PROFILE=local octopaas auth status

octopaas auth token

Print the bearer token octopaas would send, renewed first if it has run out, for calling the API with another tool. Treat it like a password.

octopaas auth token

Examples

curl -H "Authorization: Bearer $(octopaas auth token)" https://api.octopaas.dev/v1/me

On this page