tokens

package
v0.6.28 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 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

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