token

package
v3.10.7 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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