Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRefreshTokenInvalid refresh token invalid ErrRefreshTokenInvalid = errors.New("refresh token is invalid") // ErrNoAuthTokenFound no access token found ErrNoAuthTokenFound = errors.New("no auth token found") // ErrInvalidAccessToken invalid access token ErrInvalidAccessToken = errors.New("invalid access token") )
Functions ¶
This section is empty.
Types ¶
type CalcSignatureInput ¶
type CalcSignatureInput struct { AccessToken string HTTPMethod string URI string Timestamp string ContentType string RawBody []byte }
CalcSignatureInput input to CalcSignature function
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages aws cognito authentication
func (*Manager) CalcSignature ¶
func (m *Manager) CalcSignature(i *CalcSignatureInput) (string, error)
CalcSignature calculates the signature for signing the requests
func (*Manager) GetTokens ¶
GetTokens gets tokens from env var or local storage if not expired else refreshes the tokens first and then provides the new tokens
func (*Manager) IsBearerAuth ¶
IsBearerAuth check if token auth type is bearer
Click to show internal directories.
Click to hide internal directories.