ephemeral

package
v0.0.0-...-625ab12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL