Documentation
¶
Index ¶
- Constants
- Variables
- func NewSignerAndVerifier(cfg Config) (*Signer, *Verifier, error)
- type Config
- type SessionPtr
- type Signer
- func (v Signer) Routes(router core.EchoRouter)
- func (v Signer) SigningSessionStatus(_ context.Context, sessionID string) (contract.SigningSessionResult, error)
- func (v Signer) Start(ctx context.Context)
- func (v Signer) StartSigningSession(contract contract.Contract, _ map[string]interface{}) (contract.SessionPointer, error)
- type SigningSessionResult
- type VPProof
- type Verifier
Constants ¶
const ContractFormat = "irma"
ContractFormat holds the readable identifier of this signing means.
const IrmaMountPath = "/public/auth/irmaclient"
IrmaMountPath contains location the irma webserver will mount
const NutsIrmaSignedContract = "NutsIrmaSignedContract"
NutsIrmaSignedContract is the type of proof used in an Irma VP
const VerifiablePresentationType = "NutsIrmaPresentation"
VerifiablePresentationType is the irma verifiable presentation type
Variables ¶
var ErrLegalEntityNotProvided = errors.New("legalEntity not provided")
ErrLegalEntityNotProvided indicates that the legalEntity is missing
Functions ¶
Types ¶
type Config ¶
type Config struct {
// PublicURL is used for discovery for the IRMA app.
PublicURL string
// Where to find the IrmaConfig files including the schemas
IrmaConfigPath string
// Which scheme manager to use
IrmaSchemeManager string
// Auto update the schemas every x minutes or not?
AutoUpdateIrmaSchemas bool
// Use the IRMA server in production mode. Without this the IRMA app needs to be in "developer mode"
// https://irma.app/docs/irma-app/#developer-mode
Production bool
// CORS configuration
CORSOrigin []string
}
Config holds the configuration for the irma server.
type SessionPtr ¶
SessionPtr should be made private when v0 is removed
func (SessionPtr) MarshalJSON ¶
func (s SessionPtr) MarshalJSON() ([]byte, error)
MarshalJSON marshals a custom session pointer json object for the IRMA means.
func (SessionPtr) Payload ¶
func (s SessionPtr) Payload() []byte
Payload renders the IrmaQRCode as json according to irmago.Qr
func (SessionPtr) SessionID ¶
func (s SessionPtr) SessionID() string
SessionID returns the SessionID of the SessionPtr
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer signs contracts using the IRMA logic.
func (Signer) Routes ¶
func (v Signer) Routes(router core.EchoRouter)
func (Signer) SigningSessionStatus ¶
func (v Signer) SigningSessionStatus(_ context.Context, sessionID string) (contract.SigningSessionResult, error)
SigningSessionStatus returns the current status of a certain session. It returns nil if the session is not found
func (Signer) StartSigningSession ¶
func (v Signer) StartSigningSession(contract contract.Contract, _ map[string]interface{}) (contract.SessionPointer, error)
StartSigningSession accepts a rawContractText and creates an IRMA signing session.
type SigningSessionResult ¶
type SigningSessionResult struct {
server.SessionResult
}
SigningSessionResult implements the SigningSessionResult interface and contains the SigningSessionResult from the IRMA means.
func (SigningSessionResult) Status ¶
func (s SigningSessionResult) Status() string
Status returns the IRMA signing status
func (SigningSessionResult) VerifiablePresentation ¶
func (s SigningSessionResult) VerifiablePresentation() (*vc.VerifiablePresentation, error)
VerifiablePresentation returns an IRMA implementation of the contract.VerifiablePresentation interface.
type Verifier ¶
type Verifier struct {
IrmaConfig *irma.Configuration
Templates contract.TemplateStore
// contains filtered or unexported fields
}
func (Verifier) VerifyVP ¶
func (v Verifier) VerifyVP(vp vc.VerifiablePresentation, checkTime *time.Time) (contract.VPVerificationResult, error)
VerifyVP expects the given raw VerifiablePresentation to be of the correct type todo: type check?