Method: Vault::AppRole#create_secret_id
- Defined in:
- lib/vault/api/approle.rb
#create_secret_id(role_name, options = {}) ⇒ true
Generates and issues a new SecretID on an existing AppRole.
160 161 162 163 164 165 166 167 168 |
# File 'lib/vault/api/approle.rb', line 160 def create_secret_id(role_name, = {}) headers = extract_headers!() if [:secret_id] json = client.post("/v1/auth/approle/role/#{encode_path(role_name)}/custom-secret-id", JSON.fast_generate(), headers) else json = client.post("/v1/auth/approle/role/#{encode_path(role_name)}/secret-id", JSON.fast_generate(), headers) end return Secret.decode(json) end |