tokens

package
v0.4.44 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Refresh string `json:"refresh"`
	Access  string `json:"access"`
}

type TokenResult

type TokenResult struct {
	// contains filtered or unexported fields
}

TokenResult is the response from a Create request. Use ExtractToken() to interpret it as a Token

func Create

Create authenticates and either generates a new token

func RefreshGCloud

RefreshPlatform token with gcloud API

func RefreshPlatform

RefreshPlatform token with GCore platform API

func SelectAccount added in v0.4.4

func SelectAccount(c *gcorecloud.ServiceClient, clientID string) (r TokenResult)

SelectAccount select an account which you want to get access to

func (TokenResult) ExtractAccessToken

func (r TokenResult) ExtractAccessToken() (string, error)

func (TokenResult) ExtractInto

func (r TokenResult) ExtractInto(v interface{}) error

func (TokenResult) ExtractRefreshToken

func (r TokenResult) ExtractRefreshToken() (string, error)

func (TokenResult) ExtractTokens

func (r TokenResult) ExtractTokens() (*Token, error)

ExtractToken interprets a commonResult as a Token.

func (TokenResult) ExtractTokensPair

func (r TokenResult) ExtractTokensPair() (string, string, error)

Directories

Path Synopsis
tokens unit tests
tokens unit tests

Jump to

Keyboard shortcuts

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