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, local_user) ⇒ Keychain
constructor
A new instance of Keychain.
- #token ⇒ Object
- #token=(token) ⇒ Object
Constructor Details
#initialize(login, local_user) ⇒ Keychain
Returns a new instance of Keychain.
19 20 21 22 23 24 |
# File 'lib/boxen/keychain.rb', line 19 def initialize(login, local_user) @login = login @local_user = local_user # Clear the password. We're storing tokens now. set PASSWORD_SERVICE, "" end |
Instance Method Details
#token ⇒ Object
26 27 28 |
# File 'lib/boxen/keychain.rb', line 26 def token get TOKEN_SERVICE end |
#token=(token) ⇒ Object
30 31 32 |
# File 'lib/boxen/keychain.rb', line 30 def token=(token) set TOKEN_SERVICE, token end |