Commit 9198e2c
Changed files (2)
lib
saml
kit
spec
saml
builders
lib/saml/kit/assertion.rb
@@ -14,6 +14,10 @@ module Saml
@configuration = configuration
end
+ def issuer
+ assertion.fetch('Issuer')
+ end
+
def name_id
assertion.fetch('Subject', {}).fetch('NameID', nil)
end
spec/saml/builders/response_spec.rb
@@ -28,6 +28,13 @@ RSpec.describe Saml::Kit::Builders::Response do
result = subject.build
expect(result).to be_valid
end
+
+ it 'includes the issuer' do
+ subject.encrypt = false
+ result = subject.build
+ expect(result.issuer).to eql(issuer)
+ expect(result.assertion.issuer).to eql(issuer)
+ end
end
describe "#to_xml" do