Commit 3b8aa3f
Changed files (12)
lib
spec
lib/saml/kit/builders/authentication_request.rb
@@ -18,18 +18,6 @@ module Saml
@version = "2.0"
end
- # @deprecated Use {#assertion_consumer_service_url} instead of this method.
- def acs_url
- Saml::Kit.deprecate("acs_url is deprecated. Use assertion_consumer_service_url instead")
- self.assertion_consumer_service_url
- end
-
- # @deprecated Use {#assertion_consumer_service_url=} instead of this method.
- def acs_url=(value)
- Saml::Kit.deprecate("acs_url= is deprecated. Use assertion_consumer_service_url= instead")
- self.assertion_consumer_service_url = value
- end
-
def build
Saml::Kit::AuthenticationRequest.new(to_xml)
end
lib/saml/kit/authentication_request.rb
@@ -54,9 +54,6 @@ module Saml
end
response_binding.serialize(builder, relay_state: relay_state)
end
-
- # @deprecated Use {#Saml::Kit::Builders::AuthenticationRequest} instead of this.
- Builder = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::AuthenticationRequest::Builder', 'Saml::Kit::Builders::AuthenticationRequest')
end
end
end
lib/saml/kit/configuration.rb
@@ -89,41 +89,11 @@ module Saml
key_pairs(use: use).flat_map(&:private_key)
end
- # @deprecated Use {#certificates} instead of this method.
- def encryption_certificate
- Saml::Kit.deprecate("encryption_certificate is deprecated. Use certificates(use: :encryption) instead")
- certificates(use: :encryption).last
- end
-
- # @deprecated Use {#private_keys} instead of this method.
- def signing_private_key
- Saml::Kit.deprecate("signing_private_key is deprecated. Use private_keys(use: :signing) instead")
- private_keys(use: :signing).last
- end
-
- # @deprecated Use {#private_keys} instead of this method.
- def encryption_private_key
- Saml::Kit.deprecate("encryption_private_key is deprecated. Use private_keys(use: :encryption) instead")
- private_keys(use: :encryption).last
- end
-
# Returns true if there is at least one signing certificate registered.
def sign?
certificates(use: :signing).any?
end
- # @deprecated Use {#entity_id} instead of this method.
- def issuer
- Saml::Kit.deprecate("issuer is deprecated. Use entity_id instead")
- self.entity_id
- end
-
- # @deprecated Use {#entity_id=} instead of this method.
- def issuer=(value)
- Saml::Kit.deprecate("issuer= is deprecated. Use entity_id= instead")
- self.entity_id = value
- end
-
private
def ensure_proper_use!(use)
lib/saml/kit/identity_provider_metadata.rb
@@ -84,9 +84,6 @@ module Saml
def self.builder_class
Saml::Kit::Builders::IdentityProviderMetadata
end
-
- # @deprecated Use {#Saml::Kit::Builders::IdentityProviderMetadata} instead of this.
- Builder = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::IdentityProviderMetadata::Builder', 'Saml::Kit::Builders::IdentityProviderMetadata')
end
end
end
lib/saml/kit/logout_request.rb
@@ -52,9 +52,6 @@ module Saml
response_binding.serialize(builder, relay_state: relay_state)
end
- # @deprecated Use {#Saml::Kit::Builders::LogoutRequest} instead of this.
- Builder = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::LogoutRequest::Builder', 'Saml::Kit::Builders::LogoutRequest')
-
private
def single_logout_service
lib/saml/kit/logout_response.rb
@@ -12,9 +12,6 @@ module Saml
@request_id = request_id
super(xml, name: "LogoutResponse", configuration: configuration)
end
-
- # @deprecated Use {#Saml::Kit::Builders::LogoutResponse} instead of this.
- Builder = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::LogoutResponse::Builder', 'Saml::Kit::Builders::LogoutResponse')
end
end
end
lib/saml/kit/namespaces.rb
@@ -19,9 +19,6 @@ module Saml
UNSPECIFIED_NAMEID = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
URI = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
VERSION_MISMATCH_ERROR = "urn:oasis:names:tc:SAML:2.0:status:VersionMismatch"
-
- # @deprecated Use {#::Xml::Kit::Namespace::XMLDSIG} instead of this.
- XMLDSIG = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::Namespaces::XMLDSIG', '::Xml::Kit::Namespaces::XMLDSIG')
end
end
end
lib/saml/kit/service_provider_metadata.rb
@@ -29,9 +29,6 @@ module Saml
def self.builder_class
Saml::Kit::Builders::ServiceProviderMetadata
end
-
- # @deprecated Use 'Saml::Kit::Builders::ServiceProviderMetadata'.
- Builder = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::ServiceProviderMetadata::Builder', 'Saml::Kit::Builders::ServiceProviderMetadata')
end
end
end
lib/saml/kit/xml_templatable.rb
@@ -15,12 +15,6 @@ module Saml
embed_signature && configuration.sign?
end
- # @deprecated Use {#embed_signature=} instead of this method.
- def sign=(value)
- Saml::Kit.deprecate("sign= is deprecated. Use embed_signature= instead.")
- self.embed_signature = value
- end
-
def digest_method
configuration.digest_method
end
lib/saml/kit.rb
@@ -62,14 +62,9 @@ module Saml
end
def deprecate(message)
- @deprecation ||= ActiveSupport::Deprecation.new('1.0.0', 'saml-kit')
+ @deprecation ||= ActiveSupport::Deprecation.new('2.0.0', 'saml-kit')
@deprecation.deprecation_warning(message)
end
end
-
- # @deprecated Use {#::Xml::Kit::Id} instead of this.
- Id = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::Id', '::Xml::Kit::Id')
- # @deprecated Use {#::Xml::Kit::Fingerprint} instead of this.
- Fingerprint = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Saml::Kit::Fingerprint', '::Xml::Kit::Fingerprint')
end
end
spec/saml/builders/authentication_request_spec.rb
@@ -22,10 +22,5 @@ RSpec.describe Saml::Kit::Builders::AuthenticationRequest do
expect(result['AuthnRequest']['Issuer']).to eql(issuer)
expect(result['AuthnRequest']['NameIDPolicy']['Format']).to eql(Saml::Kit::Namespaces::PERSISTENT)
end
-
- it 'marks acs_url as deprecated' do
- subject.acs_url = FFaker::Internet.uri('https')
- expect(subject.assertion_consumer_service_url).to eql(subject.acs_url)
- end
end
end
spec/saml/service_provider_metadata_spec.rb
@@ -150,11 +150,4 @@ RSpec.describe Saml::Kit::ServiceProviderMetadata do
expect(result.assertion_consumer_service_for(binding: :http_post).location).to eql(assertion_consumer_service_url)
end
end
-
- describe "deprecations" do
- it 'resolves the old builder constant' do
- subject = Saml::Kit::ServiceProviderMetadata::Builder.new
- expect(subject).to be_present
- end
- end
end