stone

package
v0.0.0-...-3f9ec74 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BadRequestError  = "status code 400"
	DocumentNotFound = "mongo: no documents in result"
)
View Source
const (
	StoneRealm = "stone"
)

Variables

View Source
var (
	HttpClient = &util.HTTPClient{}

	AccessTokenPayload = map[string]string{
		"client_id":             "",
		"grant_type":            "client_credentials",
		"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
		"client_assertion":      "",
	}
)

Functions

func AuthenticationWithRetryOnBadRequest

func AuthenticationWithRetryOnBadRequest(log *log.Log) (string, error)

AuthenticationWithRetryOnBadRequest encapsulates logic for retry access token request once again in bad request status code. That's because duplicated jti returns this mencioned status code

func New

func New() bankStone

New Create a new Stone Integration Instance

Types

type AuthResponse

type AuthResponse struct {
	AccessToken           string `json:"access_token"`
	AccessTokenExpiresAt  int    `json:"expires_in"`
	RefreshToken          string `json:"refresh_token"`
	RefreshTokenCreatedAt int    `json:"refresh_expires_in"`
	TokenType             string `json:"token_type"`
	NotBeforePolicy       int    `json:"not-before-policy"`
	SessionState          string `json:"session_state"`
	Scope                 string `json:"scope"`
}

Jump to

Keyboard shortcuts

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