Skip to content

Commit ef483b3

Browse files
committed
fixup! documentation
Signed-off-by: Angelo De Caro <[email protected]>
1 parent 50730c3 commit ef483b3

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

docs/services/identity.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,16 @@ Both implementations leverage the concept of Hyperledger Fabric MSP ([https://hy
7676

7777
* **MSP X.509:** This implementation retrieves long-term identities from local folders adhering to the X.509-based MSP format.
7878
* **MSP Idemix:** This implementation loads long-term identities from local folders that follow the Idemix-based MSP format.
79+
80+
## Using the Identity Service in a Token Driver
81+
82+
If you want to use the Identity Service in your Token Driver, then here is what you need to do.
83+
84+
First, instantiate your roles. The identity service come equipped with two `Role` implementation.
85+
One is based on X.509 certificates, the other one is based on Idemix.
86+
Both requires the identities to be stored following the Hyperledger Fabric MSP prescriptions.
87+
88+
High level, these are the steps to follow:
89+
1. Instantiate the roles your driver will support.
90+
2. Instantiate the Identity Provider passing the constructed roles.
91+
3. Instantiate the Wallet Registries for each role.

token/driver/identity.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ type IdentityProvider interface {
4444
// RegisterAuditInfo binds the audit information to the passed identity
4545
RegisterAuditInfo(id view.Identity, auditInfo []byte) error
4646

47+
WalletIDs(role IdentityRole) ([]string, error)
48+
4749
// GetAuditInfo returns the audit information associated to the passed identity, nil otherwise
4850
GetAuditInfo(identity view.Identity) ([]byte, error)
4951

0 commit comments

Comments
 (0)