token

package
v3.0.0-...-9d75b9b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package token contains CLI client token related helpers tToken files consist of one line per token, each token having the structure of `micro://envAddress/namespace[/id]:token`, ie. micro://m3o.com/foo-bar-baz/asim@aslam.me:afsafasfasfaceevqcCEWVEWV or micro://m3o.com/foo-bar-baz:afsafasfasfaceevqcCEWVEWV

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx *cli.Context) (*auth.AccountToken, error)

Get tries a best effort read of auth token from user config. Might have missing `RefreshToken` or `Expiry` fields in case of incomplete or corrupted user config.

func Remove

func Remove(ctx *cli.Context) error

Remove deletes a token. Useful when trying to reset test for example at testing: not having a token is a different state than having an invalid token.

func Save

func Save(ctx *cli.Context, token *auth.AccountToken) error

Save saves the auth token to the user's local config file Caution: it overwrites $env.current-user with the accountID that the account token represents.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL