Class: Conjur::API
- Inherits:
-
Object
- Object
- Conjur::API
- Defined in:
- lib/conjur/api/pubkeys.rb,
lib/conjur/pubkeys-api.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#add_public_key(username, key) ⇒ Object
Add a public key for the given user.
-
#delete_public_key(username, keyname) ⇒ Object
Delete a public key for the given user and key name.
-
#public_key(username, keyname) ⇒ Object
Return a specific public key for a given user and key name.
-
#public_keys(username) ⇒ Object
Return all of a user’s public keys, as a newline delimited string (the format expected by authorized-keys).
Class Method Details
.pubkeys_asset_host ⇒ Object
32 33 34 |
# File 'lib/conjur/pubkeys-api.rb', line 32 def pubkeys_asset_host Conjur.configuration.pubkeys_url end |
Instance Method Details
#add_public_key(username, key) ⇒ Object
Add a public key for the given user
36 37 38 |
# File 'lib/conjur/api/pubkeys.rb', line 36 def add_public_key username, key public_keys_resource(username).post key end |
#delete_public_key(username, keyname) ⇒ Object
Delete a public key for the given user and key name
41 42 43 |
# File 'lib/conjur/api/pubkeys.rb', line 41 def delete_public_key username, keyname public_keys_resource(username, keyname).delete end |
#public_key(username, keyname) ⇒ Object
Return a specific public key for a given user and key name
31 32 33 |
# File 'lib/conjur/api/pubkeys.rb', line 31 def public_key username, keyname public_keys_resource(username, keyname).get end |
#public_keys(username) ⇒ Object
Return all of a user’s public keys, as a newline delimited string (the format expected by authorized-keys)
26 27 28 |
# File 'lib/conjur/api/pubkeys.rb', line 26 def public_keys username public_keys_resource(username).get end |