Versions in this module Expand all Collapse all v1 v1.0.1 Jun 9, 2021 v1.0.0 Jun 9, 2021 Changes in this version + const AccountOff + const AccountOn + const DefaultAccessKey + const DefaultSecretKey + var DefaultCredentials = Credentials + var ErrInvalidAccessKeyLength = fmt.Errorf("access key length should be between %d and %d", accessKeyMinLen, ...) + var ErrInvalidDuration = errors.New("invalid token expiry") + var ErrInvalidSecretKeyLength = fmt.Errorf("secret key length should be between %d and %d", secretKeyMinLen, ...) + func ExpToInt64(expI interface{}) (expAt int64, err error) + func ExtractClaims(token, secretKey string) (*jwt.MapClaims, error) + func IsAccessKeyValid(accessKey string) bool + func IsSecretKeyValid(secretKey string) bool + func JWTSignWithAccessKey(accessKey string, m map[string]interface{}, tokenSecret string) (string, error) + type Credentials struct + AccessKey string + Expiration time.Time + Groups []string + ParentUser string + SecretKey string + SessionToken string + Status string + func CreateCredentials(accessKey, secretKey string) (cred Credentials, err error) + func CreateNewCredentialsWithMetadata(accessKey, secretKey string, m map[string]interface{}, tokenSecret string) (cred Credentials, err error) + func GetNewCredentials() (cred Credentials, err error) + func GetNewCredentialsWithMetadata(m map[string]interface{}, tokenSecret string) (cred Credentials, err error) + func (cred Credentials) Equal(ccred Credentials) bool + func (cred Credentials) IsExpired() bool + func (cred Credentials) IsServiceAccount() bool + func (cred Credentials) IsTemp() bool + func (cred Credentials) IsValid() bool + func (cred Credentials) String() string