auth

package
v0.0.0-...-6347526 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthClient

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

func NewAuthClient

func NewAuthClient(conf *config.Config) (*AuthClient, error)

NewClient creates a instance of the huawei cloud auth client It's contained in huawei cloud app and provides service through huawei cloud app If AuthUrl is null using default auth url address

func (*AuthClient) GetAuthToken

func (ac *AuthClient) GetAuthToken(ctx context.Context) (string, error)

GetAuthToken gets token from huawei cloud the developer can access the app by using this token

type TokenMsg

type TokenMsg struct {
	AccessToken      string `json:"access_token"`
	ExpiresIn        int    `json:"expires_in"`
	Scope            string `json:"scope"`
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

Jump to

Keyboard shortcuts

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