node

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OktaScheme = "OKTA-"
	DuoScheme  = "DUO-"
	OryScheme  = "ORY-"
	IdpScheme  = "IDP-"
	SelfScheme = "AGNTCY-"
)

All IDP schemes supported by the ID generator. The ID generator creates IDs based on the proof and issuer information.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDGenerator

type IDGenerator interface {
	GenerateFromProof(
		ctx context.Context,
		proof *vctypes.Proof,
	) (string, *issuertypes.Issuer, error)
}

func NewIDGenerator

func NewIDGenerator(
	verifService issuerverification.Service,
) IDGenerator

type IdService

type IdService interface {
	Generate(
		ctx context.Context,
		issuer *issuertypes.Issuer,
		proof *vctypes.Proof,
	) (*idtypes.ResolverMetadata, error)
	Resolve(
		ctx context.Context,
		id string,
	) (*idtypes.ResolverMetadata, error)
}

func NewIdService

func NewIdService(
	idRepository idcore.IdRepository,
	idGenerator IDGenerator,
) IdService

type IssuerService

type IssuerService interface {
	// Register a new Issuer
	// In case of external IdPs provide a proof of ownership
	Register(ctx context.Context, issuer *issuertypes.Issuer, proof *vctypes.Proof) error

	// Find the issuer by common name
	// Return the public keys of the Issuer
	GetJwks(ctx context.Context, commonName string) (*jwk.Jwks, error)
}

The IssuerService interface defines the Node methods for Issuers

func NewIssuerService

func NewIssuerService(
	issuerRepository issuercore.Repository,
	verficationService verification.Service,
) IssuerService

NewIssuerService creates a new instance of the IssuerService

type VerifiableCredentialService

type VerifiableCredentialService interface {
	Publish(
		ctx context.Context,
		credential *vctypes.EnvelopedCredential,
		proof *vctypes.Proof,
	) error

	// Find the vcs by resolver metadata ID
	GetVcs(
		ctx context.Context,
		resolverMetadataID string,
	) ([]*vctypes.EnvelopedCredential, error)

	// Parse and verify a Verifiable Credential
	Verify(
		ctx context.Context,
		credential *vctypes.EnvelopedCredential,
	) (*vctypes.VerificationResult, error)

	// Revoke a Verifiable Credential. THIS ACTION IS NOT REVERSIBLE.
	Revoke(
		ctx context.Context,
		credential *vctypes.EnvelopedCredential,
		proof *vctypes.Proof,
	) error
}

func NewVerifiableCredentialService

func NewVerifiableCredentialService(
	idRepository idcore.IdRepository,
	verifService issuerverification.Service,
	vcRepository vccore.Repository,
) VerifiableCredentialService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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