jades

package
v0.0.0-...-e9052da Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DOCUMENT_NAME = "RemoteDocument"
View Source
const TOKEN_EXTRACTION_STRATEGY = "NONE"

Variables

View Source
var ErrorBadResponse = errors.New("bad_response_from_validation_endpoint")
View Source
var ErrorEmptyBodyResponse = errors.New("empty_body_response_from_validation_endpoint")
View Source
var ErrorValidationServiceNotReady = errors.New("validation_service_not_ready")

Functions

This section is empty.

Types

type ExternalJAdESValidator

type ExternalJAdESValidator struct {
	HttpClient        common.HttpClient
	ValidationAddress string
	HealthAddress     string
}

Validator implementation, that uses an external validation service(based on https://github.com/esig/dss)

func (*ExternalJAdESValidator) IsReady

func (v *ExternalJAdESValidator) IsReady() error

health check function, to signal the external service beeing ready

func (*ExternalJAdESValidator) ValidateSignature

func (v *ExternalJAdESValidator) ValidateSignature(signature string) (success bool, err error)

type JAdESValidator

type JAdESValidator interface {
	ValidateSignature(signature string) (bool, error)
}

Validator for JAdES(https://www.etsi.org/deliver/etsi_ts/119100_119199/11918201/01.01.01_60/ts_11918201v010101p.pdf) signatures

type SignedDocument

type SignedDocument struct {
	Bytes string `json:"bytes"`
	Name  string `json:"name"`
}

type SimpleReport

type SimpleReport struct {
	DocumentName string `json:"documentName"`
	// we only need to see that all signatures are valid, then nothing else has to be mapped
	ValidSignaturesCount int `json:"validSignaturesCount"`
	SignaturesCount      int `json:"signaturesCount"`
}

type ValidationRequest

type ValidationRequest struct {
	SignedDocument          SignedDocument `json:"signedDocument"`
	TokenExtractionStrategy string         `json:"tokenExtractionStrategy"`
}

type ValidationResponse

type ValidationResponse struct {
	SimpleReport SimpleReport `json:"simpleReport"`
}

Jump to

Keyboard shortcuts

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