Class: Boxen::Keychain
- Inherits:
-
Object
- Object
- Boxen::Keychain
- Defined in:
- lib/boxen/keychain.rb
Constant Summary collapse
- HELPER =
The keychain proxy we use to provide isolation and a friendly message in security prompts.
File. "../../../script/Boxen", __FILE__
- PASSWORD_SERVICE =
The service name to use when loading/saving passwords.
"GitHub Password"
- TOKEN_SERVICE =
The service name to use when loading/saving API keys.
"GitHub API Token"
Instance Method Summary collapse
-
#initialize(login) ⇒ Keychain
constructor
A new instance of Keychain.
- #password ⇒ Object
- #password=(password) ⇒ Object
- #token ⇒ Object
- #token=(token) ⇒ Object
Constructor Details
#initialize(login) ⇒ Keychain
Returns a new instance of Keychain.
19 20 21 |
# File 'lib/boxen/keychain.rb', line 19 def initialize(login) @login = login end |
Instance Method Details
#password ⇒ Object
23 24 25 |
# File 'lib/boxen/keychain.rb', line 23 def password get PASSWORD_SERVICE end |
#password=(password) ⇒ Object
27 28 29 |
# File 'lib/boxen/keychain.rb', line 27 def password=(password) set PASSWORD_SERVICE, password end |
#token ⇒ Object
31 32 33 |
# File 'lib/boxen/keychain.rb', line 31 def token get TOKEN_SERVICE end |
#token=(token) ⇒ Object
35 36 37 |
# File 'lib/boxen/keychain.rb', line 35 def token=(token) set TOKEN_SERVICE, token end |