Class: Virgil::SDK::HighLevel::VirgilAppCredentials
- Inherits:
-
Object
- Object
- Virgil::SDK::HighLevel::VirgilAppCredentials
- Defined in:
- lib/virgil/sdk/high_level/virgil_app_credentials.rb
Overview
This class provides credentials for application authentication using AppID and AppKey retrieved from development deshboard.
Instance Attribute Summary collapse
-
#app_id ⇒ String
readonly
uniquely identifies your application in Virgil services, and it is also used to identify the Virgil Card/Public key generated in a pair with application key.
-
#app_key_data ⇒ VirgilBuffer
readonly
Application Private key value wrapped by an instance of the VirgilBuffer class.
-
#app_key_password ⇒ String
readonly
Application key password is used to protect the application key.
Instance Method Summary collapse
-
#app_key(crypto) ⇒ Keys::PrivateKey
Application key is representing a Private key that is used to perform creation and revocation of Virgil Cards (Public key) in Virgil services.
-
#initialize(app_id:, app_key_data:, app_key_password:) ⇒ VirgilAppCredentials
constructor
Initializes a new instance of the VirgilAppCredentials class.
Constructor Details
#initialize(app_id:, app_key_data:, app_key_password:) ⇒ VirgilAppCredentials
Initializes a new instance of the Virgil::SDK::HighLevel::VirgilAppCredentials class
56 57 58 59 60 |
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 56 def initialize(app_id:, app_key_data:, app_key_password:) @app_id = app_id @app_key_data = app_key_data @app_key_password = app_key_password end |
Instance Attribute Details
#app_id ⇒ String (readonly)
uniquely identifies your application in Virgil services, and it is also used to identify the Virgil Card/Public key generated in a pair with application key.
45 46 47 |
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 45 def app_id @app_id end |
#app_key_data ⇒ VirgilBuffer (readonly)
Application Private key value wrapped by an instance of the Virgil::SDK::HighLevel::VirgilBuffer class.
49 50 51 |
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 49 def app_key_data @app_key_data end |
#app_key_password ⇒ String (readonly)
Application key password is used to protect the application key.
53 54 55 |
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 53 def app_key_password @app_key_password end |
Instance Method Details
#app_key(crypto) ⇒ Keys::PrivateKey
Application key is representing a Private key that is used to perform creation and revocation of Virgil Cards (Public key) in Virgil services. Also the application key can be used for cryptographic operations to take part in application logic.
67 68 69 |
# File 'lib/virgil/sdk/high_level/virgil_app_credentials.rb', line 67 def app_key(crypto) crypto.import_private_key(app_key_data.bytes, app_key_password) end |