Class: SamlIdp::Configurator

Inherits:
Object
  • Object
show all
Defined in:
lib/saml_idp/configurator.rb

Defined Under Namespace

Classes: TechnicalContact

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfigurator

Returns a new instance of Configurator.



27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/saml_idp/configurator.rb', line 27

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. = ->(id, settings) {  }
  self.service_provider. = ->(id, service_provider) {  }
  self.session_expiry = 0
  self.attributes = {}
  self.logger = (defined?(::Rails) && Rails.respond_to?(:logger)) ? Rails.logger : ->(msg) { puts msg }
end

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm.



10
11
12
# File 'lib/saml_idp/configurator.rb', line 10

def algorithm
  @algorithm
end

#assertion_consumer_service_hostsObject

Returns the value of attribute assertion_consumer_service_hosts.



23
24
25
# File 'lib/saml_idp/configurator.rb', line 23

def assertion_consumer_service_hosts
  @assertion_consumer_service_hosts
end

#attribute_service_locationObject

Returns the value of attribute attribute_service_location.



16
17
18
# File 'lib/saml_idp/configurator.rb', line 16

def attribute_service_location
  @attribute_service_location
end

#attributesObject

Returns the value of attribute attributes.



21
22
23
# File 'lib/saml_idp/configurator.rb', line 21

def attributes
  @attributes
end

#base_saml_locationObject

Returns the value of attribute base_saml_location.



13
14
15
# File 'lib/saml_idp/configurator.rb', line 13

def base_saml_location
  @base_saml_location
end

#entity_idObject

Returns the value of attribute entity_id.



14
15
16
# File 'lib/saml_idp/configurator.rb', line 14

def entity_id
  @entity_id
end

#loggerObject

Returns the value of attribute logger.



25
26
27
# File 'lib/saml_idp/configurator.rb', line 25

def logger
  @logger
end

#organization_nameObject

Returns the value of attribute organization_name.



11
12
13
# File 'lib/saml_idp/configurator.rb', line 11

def organization_name
  @organization_name
end

#organization_urlObject

Returns the value of attribute organization_url.



12
13
14
# File 'lib/saml_idp/configurator.rb', line 12

def organization_url
  @organization_url
end

#passwordObject

Returns the value of attribute password.



9
10
11
# File 'lib/saml_idp/configurator.rb', line 9

def password
  @password
end

#reference_id_generatorObject

Returns the value of attribute reference_id_generator.



15
16
17
# File 'lib/saml_idp/configurator.rb', line 15

def reference_id_generator
  @reference_id_generator
end

#secret_keyObject

Returns the value of attribute secret_key.



8
9
10
# File 'lib/saml_idp/configurator.rb', line 8

def secret_key
  @secret_key
end

#service_providerObject

Returns the value of attribute service_provider.



22
23
24
# File 'lib/saml_idp/configurator.rb', line 22

def service_provider
  @service_provider
end

#session_expiryObject

Returns the value of attribute session_expiry.



24
25
26
# File 'lib/saml_idp/configurator.rb', line 24

def session_expiry
  @session_expiry
end

#single_logout_service_post_locationObject

Returns the value of attribute single_logout_service_post_location.



19
20
21
# File 'lib/saml_idp/configurator.rb', line 19

def single_logout_service_post_location
  @single_logout_service_post_location
end

#single_logout_service_redirect_locationObject

Returns the value of attribute single_logout_service_redirect_location.



20
21
22
# File 'lib/saml_idp/configurator.rb', line 20

def single_logout_service_redirect_location
  @single_logout_service_redirect_location
end

#single_service_post_locationObject

Returns the value of attribute single_service_post_location.



17
18
19
# File 'lib/saml_idp/configurator.rb', line 17

def single_service_post_location
  @single_service_post_location
end

#single_service_redirect_locationObject

Returns the value of attribute single_service_redirect_location.



18
19
20
# File 'lib/saml_idp/configurator.rb', line 18

def single_service_redirect_location
  @single_service_redirect_location
end

#x509_certificateObject

Returns the value of attribute x509_certificate.



7
8
9
# File 'lib/saml_idp/configurator.rb', line 7

def x509_certificate
  @x509_certificate
end

Instance Method Details

#name_idObject

formats getter



43
44
45
# File 'lib/saml_idp/configurator.rb', line 43

def name_id
  @name_id ||= OpenStruct.new
end

#technical_contactObject



47
48
49
# File 'lib/saml_idp/configurator.rb', line 47

def technical_contact
  @technical_contact ||= TechnicalContact.new
end