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

              Source Files