tokens

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 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 RefreshECCloud

RefreshECCloud token with EdgeCloud API.

func RefreshPlatform

func RefreshPlatform(c *edgecloud.ServiceClient, opts edgecloud.TokenOptionsBuilder) (r TokenResult)

RefreshPlatform token with EdgeCenter platform API.

func SelectAccount

func SelectAccount(c *edgecloud.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