Package org.hyperledger.fabric.sdk
Interface User
-
- All Known Implementing Classes:
IdemixUser
,NetworkConfig.UserInfo
public interface User
User - Is the interface needed to be implemented by embedding application of the SDK
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
getAccount()
Get the user's accountjava.lang.String
getAffiliation()
Get the user's affiliation.Enrollment
getEnrollment()
Get the user's enrollment certificate information.java.lang.String
getMspId()
Get the Membership Service Provider Identifier provided by the user's organization.java.lang.String
getName()
Get the name that identifies the user.java.util.Set<java.lang.String>
getRoles()
Get the roles to which the user belongs.static void
userContextCheck(User userContext)
-
-
-
Method Detail
-
getName
java.lang.String getName()
Get the name that identifies the user.- Returns:
- the user name.
-
getRoles
java.util.Set<java.lang.String> getRoles()
Get the roles to which the user belongs.- Returns:
- role names.
-
getAccount
java.lang.String getAccount()
Get the user's account- Returns:
- the account name
-
getAffiliation
java.lang.String getAffiliation()
Get the user's affiliation.- Returns:
- the affiliation.
-
getEnrollment
Enrollment getEnrollment()
Get the user's enrollment certificate information.- Returns:
- the enrollment information.
-
getMspId
java.lang.String getMspId()
Get the Membership Service Provider Identifier provided by the user's organization.- Returns:
- MSP Id.
-
userContextCheck
static void userContextCheck(User userContext) throws InvalidArgumentException
- Throws:
InvalidArgumentException
-
-