role

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	Logger                 logging.Logger
	TMSID                  token.TMSID
	Config                 driver.Config
	FSCIdentity            driver.Identity
	NetworkDefaultIdentity driver.Identity
	IdentityProvider       driver.IdentityProvider
	StorageProvider        StorageProvider
	DeserializerManager    driver.SignerDeserializerManager
}

Factory is the factory for creating wallets, idemix and x509

func NewFactory

func NewFactory(
	logger logging.Logger,
	TMSID token.TMSID,
	config driver.Config,
	fscIdentity driver.Identity,
	networkDefaultIdentity driver.Identity,
	identityProvider driver.IdentityProvider,
	storageProvider StorageProvider,
	deserializerManager driver.SignerDeserializerManager,
) *Factory

NewFactory creates a new Factory

func (*Factory) NewRole

func (f *Factory) NewRole(role identity.RoleType, defaultAnon bool, targets []driver.Identity, kmps ...membership.KeyManagerProvider) (identity.Role, error)

type Role

type Role struct {
	// contains filtered or unexported fields
}

Role models a role whose identities are anonymous

func NewRole

func NewRole(logger logging.Logger, roleID identity.RoleType, networkID string, nodeIdentity driver.Identity, localMembership localMembership) *Role

func (*Role) GetIdentityInfo

func (r *Role) GetIdentityInfo(ctx context.Context, id string) (idriver.IdentityInfo, error)

GetIdentityInfo returns the identity information for the given identity identifier

func (*Role) ID

func (r *Role) ID() identity.RoleType

func (*Role) IdentityIDs

func (r *Role) IdentityIDs() ([]string, error)

func (*Role) MapToIdentity

func (r *Role) MapToIdentity(ctx context.Context, v driver.WalletLookupID) (driver.Identity, string, error)

MapToIdentity returns the identity for the given argument

func (*Role) RegisterIdentity

func (r *Role) RegisterIdentity(ctx context.Context, config driver.IdentityConfiguration) error

RegisterIdentity registers the given identity

type StorageProvider

type StorageProvider interface {
	IdentityStore(tmsID token.TMSID) (driver.IdentityStoreService, error)
}

Jump to

Keyboard shortcuts

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