hfc.fabric.user¶
Module Contents¶
Functions¶
|
Check the user. |
|
Create user |
-
hfc.fabric.user._logger¶
-
class
hfc.fabric.user.User(name, org, state_store)¶ Bases:
objectThe default implementation of user.
-
property
name(self)¶ Get the user name :return: The user name
-
property
org(self)¶ Get the org :return: The org
-
property
roles(self)¶ Get the roles :return: The roles
-
property
account(self)¶ Get the account :return: The account
-
property
affiliation(self)¶ Get the affiliation :return: The affiliation
-
property
enrollment(self)¶ Get the enrollment
-
property
enrollment_secret(self)¶ Get the enrollment_secret
-
property
msp_id(self)¶ Get the msp_id
-
property
cryptoSuite(self)¶ Get the cryptoSuite
-
is_registered(self)¶ Check if user registered
- Returns
boolean
-
is_enrolled(self)¶ Check if user enrolled
- Returns
boolean
-
_save_state(self)¶ Persistent user state.
-
_restore_state(self)¶ Restore user state.
-
get_attrs(self)¶
-
__str__(self)¶ Return str(self).
-
property
-
hfc.fabric.user.validate(user)¶ Check the user.
- Parameters
user – A user object
- Returns
A validated user object
- Raises
ValueError – When user property is invalid
-
hfc.fabric.user.create_user(name, org, state_store, msp_id, key_path, cert_path, crypto_suite=ecies())¶ Create user
- Parameters
name – user’s name
org – org name
state_store – user state store
msp_id – msp id for the user
crypto_suite – the cryptoSuite used to store crypto and key store settings (Default value = ecies())
key_path – identity private key path
cert_path – identity public cert path
- Returns
a user instance