diff --git a/lib/vault/api/sys/auth.rb b/lib/vault/api/sys/auth.rb index ad827cac..48872b22 100644 --- a/lib/vault/api/sys/auth.rb +++ b/lib/vault/api/sys/auth.rb @@ -11,6 +11,11 @@ class Auth < Response # Name of the auth backend. # @return [String] field :type + + # @!attribute [r] accessor + # Accessor of the auth backend. + # @return [String] + field :accessor end class AuthConfig < Response @@ -29,7 +34,7 @@ class Sys # List all auths in Vault. # # @example - # Vault.sys.auths #=> {:token => #} + # Vault.sys.auths #=> {:token => #} # # @return [Hash] def auths diff --git a/spec/integration/api/sys/auth_spec.rb b/spec/integration/api/sys/auth_spec.rb index d3c3b899..ff4094cd 100644 --- a/spec/integration/api/sys/auth_spec.rb +++ b/spec/integration/api/sys/auth_spec.rb @@ -5,8 +5,13 @@ module Vault subject { vault_test_client.sys } describe "#auths" do - it "returns the list of auths" do + it "returns the list of auths with fields" do expect(subject.auths).to be + auths = subject.auths + expect(auths[:token]).to be + expect(auths[:token].type).to eq('token') + expect(auths[:token].description).to eq('token based credentials') + expect(auths[:token].accessor).to be end end