Documentation
¶
Index ¶
- func Base64String(size int) (string, error)
- func HashToken(token string) string
- func NewRandomKey(ctx context.Context, encryptor Encryptor, name string) (string, []byte, error)
- func SHA256ForMap(m map[string]string) (string, error)
- func VerifySignature(key []byte, data []byte, signature string) error
- type AESGCMEncryptor
- type Encryptor
- type NoOpEncryptor
- type OIDCVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64String ¶
func NewRandomKey ¶
Types ¶
type AESGCMEncryptor ¶
type AESGCMEncryptor struct {
// contains filtered or unexported fields
}
type Encryptor ¶
type Encryptor interface {
Encrypt(context.Context, []byte, []byte) ([]byte, error)
Decrypt(context.Context, []byte, []byte) ([]byte, error)
}
func NewAESGCMEncryptor ¶
func NewNoOpEncryptor ¶
func NewNoOpEncryptor() Encryptor
type OIDCVerifier ¶
type OIDCVerifier struct {
// contains filtered or unexported fields
}
To avoid always going to the /.well-known/openid-configuration endpoint, we rely on the way go-oidc caches public keys in oidc.IDTokenVerifier, and we keep a map of verifiers in memory for our integrations.
func NewOIDCVerifier ¶
func NewOIDCVerifier() *OIDCVerifier
Click to show internal directories.
Click to hide internal directories.