Documentation ¶
Index ¶
- Constants
- type Dummy
- func (d Dummy) SigningSessionStatus(sessionID string) (contract.SigningSessionResult, error)
- func (d Dummy) StartSigningSession(rawContractText string) (contract.SessionPointer, error)
- func (d Dummy) VerifyVP(rawVerifiablePresentation []byte, checkTime *time.Time) (*contract.VPVerificationResult, error)
- type Presentation
- type Proof
- type SignedToken
Constants ¶
const ContractFormat = contract.SigningMeans("dummy")
ContractFormat is the contract format type
const NoSignatureType = "NoSignature"
NoSignatureType is a VerifiablePresentation Proof type where no signature is given
const SessionCompleted = "completed"
SessionCompleted represents the session state after the second SessionStatus call
const SessionCreated = "created"
SessionCreated represents the session state after creation
const SessionInProgress = "in-progress"
SessionInProgress represents the session state after the first SessionStatus call
const VerifiablePresentationType = contract.VPType("DummyVerifiablePresentation")
VerifiablePresentationType is the dummy verifiable presentation type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dummy ¶
Dummy is a contract signer and verifier that always succeeds unless you try to use it in strict mode The dummy signer is not supposed to be used in a clustered context unless consecutive calls arrive at the same instance
func (Dummy) SigningSessionStatus ¶
func (d Dummy) SigningSessionStatus(sessionID string) (contract.SigningSessionResult, error)
SigningSessionStatus looks up the session by the provided sessionID param. When the session exists it returns the current state and advances the state to the next one. When the session is SessionComplete, it removes the session from the sessionStore.
func (Dummy) StartSigningSession ¶
func (d Dummy) StartSigningSession(rawContractText string) (contract.SessionPointer, error)
StartSigningSession starts a Dummy session. It takes any string and stores it under a random sessionID. This method is not available in strictMode returns the sessionPointer with the sessionID
type Presentation ¶
type Presentation struct { contract.VerifiablePresentationBase Proof Proof }
Presentation is a VerifiablePresentation without valid cryptographic proofs It is only usable in non-strict mode.
type Proof ¶
type Proof struct { // Proof type, mandatory Type string // Contract as how it was presented to the user Contract string // Initials form the signing means Initials string // Lastname form the signing means Lastname string // Birthdate form the signing means Birthdate string // Email form the signing means Email string }
Proof holds the Proof generated from the dummy Signer
type SignedToken ¶
type SignedToken struct {
// contains filtered or unexported fields
}
SignedToken is the Dummy implementation of a Signed token. It can be used in the dummy.Service service.
func (SignedToken) Contract ¶
func (d SignedToken) Contract() contract.Contract
Contract returns the contract
func (SignedToken) SignerAttributes ¶
func (d SignedToken) SignerAttributes() (map[string]string, error)
SignerAttributes returns the attributes used to sign the token