v1

package
v0.0.0-...-2730980 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_EXCEPTION_ON_GET_CERTIFICAT_AND_KEY                        = `ERROR: Exception on - Get certificat and key.`
	ERROR_EXCEPTION_ON_GET_CERTIFICAT_AND_PUBLIC_KEY_AND_PRIVATE_KEY = `ERROR: Exception on - Get certificat, public key and private key.`
)
View Source
const (
	JSON_CERTIFICAT  = `certificat`
	JSON_KEY         = "key"
	JSON_PRIVATE_KEY = `private_key`
	JSON_PUBLIC_KEY  = `public_key`
)
View Source
const (
	CODE_METHOD_HS256 = `hmac sha256`
	CODE_METHOD_HS384 = `hmac sha384`
	CODE_METHOD_HS512 = `hmac sha512`
	CODE_METHOD_RS256 = `rsa sha256`
	CODE_METHOD_RS384 = `rsa sha384`
	CODE_METHOD_RS512 = `rsa sha512`
	CODE_METHOD_ES256 = `ecdsa sha256`
	CODE_METHOD_ES384 = `ecdsa sha384`
	CODE_METHOD_ES512 = `ecdsa sha512`
	CODE_METHOD_PS256 = `rsassa-pss sha256`
	CODE_METHOD_PS384 = `rsassa-pss sha384`
	CODE_METHOD_PS512 = `rsassa-pss sha512`
)
View Source
const (
	GWJWT_CONFIG_PATH_ROUTE = `gwtls/v1/config`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CodeMethod     *string `json:"code-method,omitempty"`
	Certificat     *string `json:"certificat-pem,omitempty"`
	PrivateKey     *string `json:"private-key-pem,omitempty"`
	PublicKey      *string `json:"public-key-pem,omitempty"`
	CodeCertificat *string `json:"code-certificat,omitempty"`
}

func NewConfigFromJSON

func NewConfigFromJSON(codeAlgorithm string, sourceJson []byte, codeCertificat string) (*Config, error)

func (*Config) GetCertificat

func (conf *Config) GetCertificat() ([]byte, error)

func (*Config) GetCodeCertificat

func (conf *Config) GetCodeCertificat() (string, error)

func (*Config) GetPrivateKey

func (conf *Config) GetPrivateKey() ([]byte, error)

func (*Config) GetPublicKey

func (conf *Config) GetPublicKey() ([]byte, error)

func (*Config) GetTLSConfig

func (conf *Config) GetTLSConfig() (*tls.Config, error)

Jump to

Keyboard shortcuts

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