Comparing changes
v0.2.10
→
v0.2.11
3 commits
6 files changed
Commits
Changed files (6)
lib
saml
kit
spec
saml
builders
lib/saml/kit/builders/templates/identity_provider_metadata.builder
@@ -1,4 +1,3 @@
-signature_for(reference_id: id, xml: xml)
xml.IDPSSODescriptor descriptor_options do
configuration.certificates(use: :signing).each do |certificate|
render certificate, xml: xml
lib/saml/kit/builders/templates/metadata.builder
@@ -1,5 +1,6 @@
xml.instruct!
xml.EntityDescriptor entity_descriptor_options do
+ signature_for(reference_id: id, xml: xml)
render identity_provider, xml: xml
render service_provider, xml: xml
xml.Organization do
lib/saml/kit/builders/templates/service_provider_metadata.builder
@@ -1,4 +1,3 @@
-signature_for(reference_id: id, xml: xml)
xml.SPSSODescriptor descriptor_options do
configuration.certificates(use: :signing).each do |certificate|
render certificate, xml: xml
lib/saml/kit/version.rb
@@ -1,5 +1,5 @@
module Saml
module Kit
- VERSION = "0.2.10"
+ VERSION = "0.2.11"
end
end
spec/saml/builders/metadata_spec.rb
@@ -52,5 +52,20 @@ RSpec.describe Saml::Kit::Builders::Metadata do
expect(hash_result['EntityDescriptor']['SPSSODescriptor']['AssertionConsumerService']['Location']).to eql(url)
end
+ it 'generates signed idp and sp metadata' do
+ configuration = Saml::Kit::Configuration.new do |config|
+ config.generate_key_pair_for(use: :signing)
+ end
+ metadata = Saml::Kit::Metadata.build(configuration: configuration) do |builder|
+ builder.entity_id = FFaker::Internet.uri("https")
+ builder.build_identity_provider do |x|
+ x.embed_signature = true
+ end
+ builder.build_service_provider do |x|
+ x.embed_signature = true
+ end
+ end
+ expect(metadata).to be_present
+ end
end
end
README.md
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
## Contributing
-Bug reports and pull requests are welcome on GitHub at https://github.com/mokhan/saml-kit.
+Bug reports and pull requests are welcome on GitLab at https://gitlab.com/xlgmokha/saml-kit.
## License