AuthToken

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTokenResponse

type AuthTokenResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data struct {
		TokenType   string `json:"token_type"`
		ExpiresIn   int    `json:"expires_in"`
		AccessToken string `json:"access_token"`
	} `json:"data"`
}

=== Auth token ===

type AuthenticationService

type AuthenticationService struct {
	BaseURl                 string
	FabricID                string
	AppSecret               string
	MerchantID              string
	PrivateKeyPEM           string
	ApplyFabricTokenService *ApplyFabricToken.ApplyFabricTokenService
}

func NewAuthenticationService

func NewAuthenticationService(baseURL, fabricID, appSecret, merchantID, token, privateKeyPEM string, applyFabricTokenService *ApplyFabricToken.ApplyFabricTokenService) *AuthenticationService

func (*AuthenticationService) AuthToken

func (at *AuthenticationService) AuthToken(appToken string) (string, error)

func (*AuthenticationService) RequestAuthToken

func (at *AuthenticationService) RequestAuthToken(fabricTokenResponse string, appToken string) (*AuthTokenResponse, error)

Jump to

Keyboard shortcuts

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