pkiverifier

package
v1.0.56 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyFromClaims

func KeyFromClaims(claims *VerifierClaims) *ecdsa.PublicKey

KeyFromClaims creates the public key structure from the claims

Types

type PKIConfiguration

type PKIConfiguration struct {
	// contains filtered or unexported fields
}

PKIConfiguration is the configuration of the verifier

func NewConfig

func NewConfig(publicKey *ecdsa.PublicKey, privateKey *ecdsa.PrivateKey, cacheValiditiy time.Duration) *PKIConfiguration

NewConfig initializes a new signer structure

func (*PKIConfiguration) CreateTokenFromCertificate

func (p *PKIConfiguration) CreateTokenFromCertificate(cert *x509.Certificate) ([]byte, error)

CreateTokenFromCertificate creates and signs a token

func (*PKIConfiguration) Verify

func (p *PKIConfiguration) Verify(token []byte) (*ecdsa.PublicKey, error)

Verify verifies a token and returns the public key

type VerifierClaims

type VerifierClaims struct {
	X *big.Int
	Y *big.Int
	jwt.StandardClaims
}

VerifierClaims captures all the clains of the verifier that is basically the public key

Jump to

Keyboard shortcuts

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