Sha256: ebadb502d6b7447b4b4b88662403d9e5aac3886b94f59b7965a30296889461e1
Contents?: true
Size: 1.66 KB
Versions: 3
Compression:
Stored size: 1.66 KB
Contents
# encoding: utf-8 require 'ostruct' require 'securerandom' module SamlIdp class Configurator attr_accessor :x509_certificate attr_accessor :secret_key attr_accessor :password attr_accessor :algorithm attr_accessor :organization_name attr_accessor :organization_url attr_accessor :base_saml_location attr_accessor :entity_id attr_accessor :reference_id_generator attr_accessor :attribute_service_location attr_accessor :single_service_post_location attr_accessor :single_service_redirect_location attr_accessor :single_logout_service_post_location attr_accessor :single_logout_service_redirect_location attr_accessor :attributes attr_accessor :service_provider attr_accessor :assertion_consumer_service_hosts attr_accessor :session_expiry def initialize self.x509_certificate = Default::X509_CERTIFICATE self.secret_key = Default::SECRET_KEY self.algorithm = :sha1 self.reference_id_generator = ->() { SecureRandom.uuid } self.service_provider = OpenStruct.new self.service_provider.finder = ->(_) { Default::SERVICE_PROVIDER } self.service_provider.metadata_persister = ->(id, settings) { } self.service_provider.persisted_metadata_getter = ->(id, service_provider) { } self.session_expiry = 0 self.attributes = {} end # formats # getter def name_id @name_id ||= OpenStruct.new end def technical_contact @technical_contact ||= TechnicalContact.new end class TechnicalContact < OpenStruct def mail_to_string "mailto:#{email_address}" if email_address.to_s.length > 0 end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
saml_idp-0.14.0 | lib/saml_idp/configurator.rb |
saml_idp-0.12.0 | lib/saml_idp/configurator.rb |
saml_idp-0.11.0 | lib/saml_idp/configurator.rb |