Documentation ¶
Index ¶
- Variables
- func BuildExampleUniversityVC(universityID, recipient string) (*credential.VerifiableCredential, error)
- func BuildPresentationSubmission(presentationRequest []byte, signer crypto.JWTSigner, ...) ([]byte, error)
- func GenerateDIDPeer() (did.DID, error)
- func MakePresentationData(id string, inputID string) (exchange.PresentationDefinition, error)
- func MakePresentationRequest(jwk cryptosuite.JSONWebKey2020, ...) (pr []byte, signer *crypto.JWTSigner, err error)
- func ValidateAccess(verifier crypto.JWTVerifier, credBytes []byte) error
- type Entity
Constants ¶
This section is empty.
Variables ¶
var TrustedEntities = trustedEntitiesStore{ Issuers: make(map[string]bool), }
Functions ¶
func BuildExampleUniversityVC ¶
func BuildExampleUniversityVC(universityID, recipient string) (*credential.VerifiableCredential, error)
BuildExampleUniversityVC Makes a Verifiable Credential using the VC data type directly. Alternatively, use the builder. A VC is set of tamper-evident claims and metadata that cryptographically proves who issued it. Building a VC means using the CredentialBuilder as part of the credentials package in the ssk-sdk. VerifiableCredential is the verifiable credential model outlined in the vc-data-model spec: https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#basic-concept
func BuildPresentationSubmission ¶
func BuildPresentationSubmission(presentationRequest []byte, signer crypto.JWTSigner, verifier crypto.JWTVerifier, vc credential.VerifiableCredential) ([]byte, error)
BuildPresentationSubmission builds a submission using... https://github.com/authnull0/ssi-sdk/blob/d279ca2779361091a70b8aa3c685a388067409a9/credential/exchange/submission.go#L126
func GenerateDIDPeer ¶
func MakePresentationData ¶
func MakePresentationData(id string, inputID string) (exchange.PresentationDefinition, error)
MakePresentationData Makes a dummy presentation definition. These are eventually transported via Presentation Request. For more information on presentation definitions view the spec here: https://identity.foundation/presentation-exchange/#term:presentation-definition
func MakePresentationRequest ¶
func MakePresentationRequest(jwk cryptosuite.JSONWebKey2020, presentationData exchange.PresentationDefinition, targetID string) (pr []byte, signer *crypto.JWTSigner, err error)
MakePresentationRequest Builds a presentation request (PR). A PR is sent by a holder to a verifier. It can be sent over multiple mechanisms. For more information, please go to here: https://identity.foundation/presentation-exchange/#presentation-request and for the source code with the sdk, https://github.com/authnull0/ssi-sdk/blob/main/credential/exchange/request.go is appropriate to start off with.
func ValidateAccess ¶
func ValidateAccess(verifier crypto.JWTVerifier, credBytes []byte) error
ValidateAccess is a very simple validation process against a Presentation Submission It checks: 1. That the VC is valid 2. That the VC was issued by a trusted entity