Documentation ¶
Index ¶
- Constants
- Variables
- type RoleFactory
- func (f *RoleFactory) BindingRole(role identity.Role) (identity.Role, error)
- func (f *RoleFactory) IdentitiesForRole(role driver.IdentityRole) ([]*config.Identity, error)
- func (f *RoleFactory) NewIdemix(role driver.IdentityRole, cacheSize int, issuerPublicKey []byte, ...) (identity.Role, error)
- func (f *RoleFactory) NewWrappedX509(role driver.IdentityRole, ignoreRemote bool) (identity.Role, error)
- func (f *RoleFactory) NewX509(role driver.IdentityRole) (identity.Role, error)
- type WrappingBindingInfo
- type WrappingBindingRole
Constants ¶
View Source
const ( // OwnerMSPID is the default MSP ID for the owner wallet OwnerMSPID = "OwnerMSPID" // IssuerMSPID is the default MSP ID for the issuer wallet IssuerMSPID = "IssuerMSPID" // AuditorMSPID is the default MSP ID for the auditor wallet AuditorMSPID = "AuditorMSPID" // CertifierMSPID is the default MSP ID for the certifier wallet CertifierMSPID = "CertifierMSPID" )
View Source
const ( // X509Identity identifies an X509-based identity X509Identity identity.Type = "x509" // IdemixIdentity identifies an idemix identity IdemixIdentity identity.Type = "idemix" )
Variables ¶
View Source
var RoleToMSPID = map[driver.IdentityRole]string{ driver.OwnerRole: OwnerMSPID, driver.IssuerRole: IssuerMSPID, driver.AuditorRole: AuditorMSPID, driver.CertifierRole: CertifierMSPID, }
RoleToMSPID maps the role to the MSP ID
Functions ¶
This section is empty.
Types ¶
type RoleFactory ¶
type RoleFactory struct { Logger logging.Logger TMSID token.TMSID Config driver2.Config FSCIdentity driver.Identity NetworkDefaultIdentity driver.Identity IdentityProvider driver2.IdentityProvider SignerService driver2.SigService BinderService driver2.BinderService StorageProvider identity.StorageProvider DeserializerManager driver2.DeserializerManager // contains filtered or unexported fields }
RoleFactory is the factory for creating wallets, idemix and x509
func NewRoleFactory ¶
func NewRoleFactory( logger logging.Logger, TMSID token.TMSID, config driver2.Config, fscIdentity driver.Identity, networkDefaultIdentity driver.Identity, identityProvider driver2.IdentityProvider, signerService driver2.SigService, binderService driver2.BinderService, storageProvider identity.StorageProvider, deserializerManager driver2.DeserializerManager, ignoreRemote bool, ) *RoleFactory
NewRoleFactory creates a new RoleFactory
func (*RoleFactory) BindingRole ¶
BindingRole returns a new role wrapping the passed one. Identities will be bound to the long term identities this factory refers to.
func (*RoleFactory) IdentitiesForRole ¶
func (f *RoleFactory) IdentitiesForRole(role driver.IdentityRole) ([]*config.Identity, error)
IdentitiesForRole returns the configured identities for the passed role
func (*RoleFactory) NewIdemix ¶
func (f *RoleFactory) NewIdemix(role driver.IdentityRole, cacheSize int, issuerPublicKey []byte, curveID math3.CurveID) (identity.Role, error)
NewIdemix creates a new Idemix-based role
func (*RoleFactory) NewWrappedX509 ¶
func (f *RoleFactory) NewWrappedX509(role driver.IdentityRole, ignoreRemote bool) (identity.Role, error)
func (*RoleFactory) NewX509 ¶
func (f *RoleFactory) NewX509(role driver.IdentityRole) (identity.Role, error)
NewX509 creates a new X509-based role
type WrappingBindingInfo ¶
type WrappingBindingInfo struct { driver.IdentityInfo IdentityType identity.Type RootIdentity driver.Identity IdentityProvider driver2.IdentityProvider BinderService driver2.BinderService }
WrappingBindingInfo wraps a driver.IdentityInfo to further register the audit info, and binds the new identity to the default FSC node identity
func (*WrappingBindingInfo) EnrollmentID ¶
func (i *WrappingBindingInfo) EnrollmentID() string
func (*WrappingBindingInfo) Get ¶
func (i *WrappingBindingInfo) Get() (driver.Identity, []byte, error)
func (*WrappingBindingInfo) ID ¶
func (i *WrappingBindingInfo) ID() string
type WrappingBindingRole ¶
type WrappingBindingRole struct { identity.Role IdentityType identity.Type RootIdentity driver.Identity IdentityProvider driver2.IdentityProvider BinderService driver2.BinderService }
func (*WrappingBindingRole) GetIdentityInfo ¶
func (r *WrappingBindingRole) GetIdentityInfo(id string) (driver.IdentityInfo, error)
Click to show internal directories.
Click to hide internal directories.