Documentation ¶
Index ¶
- Variables
- type EcdsaP256Sha256SigningAlgorithm
- type EcdsaP384Sha384SigningAlgorithm
- type HttpMessageSigner
- type Option
- func SignBody() Option
- func WithAlg() Option
- func WithAuthority() Option
- func WithCreated() Option
- func WithCustomAlg(alg string) Option
- func WithExpires() Option
- func WithHeaders(headers ...string) Option
- func WithKeyId(keyId string) Option
- func WithMethod() Option
- func WithNonce() Option
- func WithPath() Option
- func WithQuery() Option
- func WithQueryParam() Option
- func WithRequestTarget() Option
- func WithScheme() Option
- func WithStatus() Option
- func WithTargetUri() Option
- type Signer
- type SigningAlgorithm
- type SigningError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoSigLabel = errors.New("missing sigLabel") ErrNothingToSign = errors.New("there are nothing to sign in the http message") )
Functions ¶
This section is empty.
Types ¶
type EcdsaP256Sha256SigningAlgorithm ¶
type EcdsaP256Sha256SigningAlgorithm struct { verifier.EcdsaP256Sha256VerifyingAlgorithm // contains filtered or unexported fields }
func NewEcdsaSha256 ¶
func NewEcdsaSha256(key *ecdsa.PrivateKey) (e EcdsaP256Sha256SigningAlgorithm, err error)
type EcdsaP384Sha384SigningAlgorithm ¶
type EcdsaP384Sha384SigningAlgorithm struct { verifier.EcdsaP384Sha384VerifyingAlgorithm // contains filtered or unexported fields }
func NewEcdsaP384Sha384SigningAlgorithm ¶
func NewEcdsaP384Sha384SigningAlgorithm(key *ecdsa.PrivateKey) (e EcdsaP384Sha384SigningAlgorithm, err error)
type HttpMessageSigner ¶
type HttpMessageSigner struct {
// contains filtered or unexported fields
}
HttpMessageSigner implements Signer using SigningAlgorithm
func New ¶
func New(alg SigningAlgorithm, sigLabel string, opts ...Option) (*HttpMessageSigner, error)
func (*HttpMessageSigner) SignRequest ¶
func (s *HttpMessageSigner) SignRequest(req *http.Request) error
type Option ¶
type Option func(*HttpMessageSigner)
func SignBody ¶
func SignBody() Option
SignBody adds "Content-Length" and "Content-Digest" headers as components if there is a body
func WithAlg ¶
func WithAlg() Option
WithAlg adds the "Alg" signature parameter and automatically gets the value based on the signing algorithm and hash used
func WithAuthority ¶
func WithAuthority() Option
func WithCustomAlg ¶
WithCustomAlg adds the "Alg" signature parameter with a custom value
func WithHeaders ¶
WithHeaders adds headers (canonicalized) to the components
func WithMethod ¶
func WithMethod() Option
func WithQueryParam ¶
func WithQueryParam() Option
func WithRequestTarget ¶
func WithRequestTarget() Option
func WithScheme ¶
func WithScheme() Option
func WithStatus ¶
func WithStatus() Option
func WithTargetUri ¶
func WithTargetUri() Option
type SigningAlgorithm ¶
type SigningError ¶
type SigningError struct { }
func (SigningError) Error ¶
func (e SigningError) Error() string
Click to show internal directories.
Click to hide internal directories.