Documentation ¶
Overview ¶
Package verification provides the ability to verify the diagnosis certificates (JWTs) coming from public health authorities that are responsible for verifying diagnosis pin codes and ceritfying the TEKs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config represents the available configuration for the public health authority verification piece.
type VerifiedClaims ¶
type VerifiedClaims struct { HealthAuthorityID int64 ReportType string // blank indicates no report type was present. SymptomOnsetInterval uint32 // 0 indicates no symptom onset interval present. This should be checked for "reasonable" value before application. TransmissionRisks verifyapi.TransmissionRiskVector }
VerifiedClaims represents the relevant claims extracted from a verified certificate that may need to be applied.
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier can be used to verify public health authority diagnosis verification certificates.
func New ¶
func New(db *database.HealthAuthorityDB, config *Config) (*Verifier, error)
New creates a new verifier, based on this DB handle.
func (*Verifier) VerifyDiagnosisCertificate ¶
func (v *Verifier) VerifyDiagnosisCertificate(ctx context.Context, authApp *aamodel.AuthorizedApp, publish *verifyapi.Publish) (*VerifiedClaims, error)
VerifyDiagnosisCertificate accepts a publish request (from which is extracts the JWT), fully verifies the JWT and signture against what the passed in authorrized app is allowed to use. Returns any transmission risk overrides if they are present.