sign

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIGNED_ACCESS_TOKEN_HEADER_NAME = "x-amz-access-token"
	REFRESH_GRANT_TYPE              = "refresh_token"
)
View Source
const (
	ServiceName = "execute-api"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSSigV4Signer

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

func NewSigner

func NewSigner(cfg SignConfig) *AWSSigV4Signer

func (*AWSSigV4Signer) Sign deprecated

func (s *AWSSigV4Signer) Sign(r *http.Request) error

Deprecated: Util 20231231. Use new_signer instead.

type LwaAuthCredentials added in v1.0.6

type LwaAuthCredentials struct {
	ClientId     string  `json:"client_id"`
	ClientSecret string  `json:"client_secret"`
	Endpoint     string  `json:"endpoint"`
	RefreshToken string  `json:"refresh_token"`
	GrantType    string  `json:"grant_type"`
	Scope        *string `json:"scope,omitempty"`
}

func (*LwaAuthCredentials) GetAccessTokenFromEndpoint added in v1.0.6

func (t *LwaAuthCredentials) GetAccessTokenFromEndpoint(ctx context.Context) (*Token, error)

type LwaAuthSigner added in v1.0.6

type LwaAuthSigner struct{}

func (*LwaAuthSigner) Sign added in v1.0.6

func (s *LwaAuthSigner) Sign(r *http.Request, token string)

type SignConfig

type SignConfig struct {
	AccessKeyID string //AWS IAM User Access Key Id
	SecretKey   string //AWS IAM User Secret Key
	Region      string //AWS Region
	RoleArn     string //AWS IAM Role ARN
	MaxRetry    int
	LogMode     []aws.ClientLogMode
	Logger      logging.Logger
}

type Token added in v1.0.6

type Token struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type,omitempty"`
	RefreshToken string `json:"refresh_token,omitempty"`
	ExpiresIn    int    `json:"expires_in"`
}

type TokenError added in v1.0.6

type TokenError struct {
	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