Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EphemeralKey ¶
type EphemeralKey struct {
PrivateKey *ecdsa.PrivateKey
}
EphemeralKey Short live key
func NewEphemeralKey ¶
func NewEphemeralKey(config *EphemeralKeyConfig) (*EphemeralKey, error)
NewEphemeralKey generates a EphemeralKey which is basically a ecdsa key
func (*EphemeralKey) AddRequestHeaders ¶
func (c *EphemeralKey) AddRequestHeaders(r *http.Request, accessToken string) error
AddRequestHeaders adds all needed credentials to authenticate the credential owner as request headers
func (*EphemeralKey) MakeCredentials ¶
func (c *EphemeralKey) MakeCredentials(message []byte, accessToken string) (map[string]string, error)
MakeCredentials generates all the needed credentials to authenticate the credential owner
func (*EphemeralKey) PublicKey ¶
func (c *EphemeralKey) PublicKey() *ecdsa.PublicKey
PublicKey retrieves the public key of the private key generated
type EphemeralKeyConfig ¶
type EphemeralKeyConfig struct {
PrivateKey *ecdsa.PrivateKey
}
EphemeralKeyConfig Configuration
Click to show internal directories.
Click to hide internal directories.