Documentation
¶
Overview ¶
TODO ts client has key and jwk files. everything ehre is unused so far but dumping for preservation purposes. need to split these out if i actually end up using them.
Index ¶
- Variables
- func GenerateNewPrivateKey() (string, error)
- func LoadBase64Key(base64Key string) (ed25519.PrivateKey, error)
- func LoadKey(input string) (ed25519.PrivateKey, error)
- func LoadKeyFromFile(path string) (ed25519.PrivateKey, error)
- func LoadPEMKey(pemString string) (ed25519.PrivateKey, error)
- func ValidateSignature(opts *ValidationOptions) error
- type ContentHeaders
- type JWK
- type SignOptions
- type SignatureHeaders
- type ValidationOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSignature = errors.New("invalid signature") ErrMissingSignature = errors.New("missing signature") ErrMissingSignatureInput = errors.New("missing signature input") )
View Source
var (
ErrMissingRequiredHeader = errors.New("missing required header")
)
Functions ¶
func GenerateNewPrivateKey ¶
func LoadBase64Key ¶
func LoadBase64Key(base64Key string) (ed25519.PrivateKey, error)
func LoadKeyFromFile ¶
func LoadKeyFromFile(path string) (ed25519.PrivateKey, error)
func LoadPEMKey ¶
func LoadPEMKey(pemString string) (ed25519.PrivateKey, error)
func ValidateSignature ¶
func ValidateSignature(opts *ValidationOptions) error
Types ¶
type ContentHeaders ¶
func CreateContentHeaders ¶
func CreateContentHeaders(body []byte) ContentHeaders
type SignOptions ¶
type SignOptions struct {
Request *http.Request
PrivateKey ed25519.PrivateKey
KeyID string
}
type SignatureHeaders ¶
func CreateSignatureHeaders ¶
func CreateSignatureHeaders(opts SignOptions) (*SignatureHeaders, error)
Click to show internal directories.
Click to hide internal directories.