SecurityContext (Common API)

Overview - Common API - Client API - Admin API - Runtime API

SecurityContext

SecurityContext is used to authenticate and manage user credentials to the underlying blockchain fabric.

Details

  • Module common

See also

Method Summary

Name Returns Description
constructor void Create the SecurityContext. Note: Only to be called by framework code.

getConnection Connection Get the owning connection.
getUser string Get the current username.

Method Details

new SecurityContext()

Create the SecurityContext. Note: Only to be called by framework code.

Parameters

Name Type Optional Description
connection Connection false The owning connection.
user string false The user identifier.

getConnection

Connection getConnection( )

Get the owning connection.

Returns

Connection - The owning connection.

Parameters

No parameters

getUser

string getUser( )

Get the current username.

Returns

string - The username

Parameters

No parameters