Class: OneLogin::RubySaml::Settings
- Inherits:
-
Object
- Object
- OneLogin::RubySaml::Settings
- Defined in:
- lib/onelogin/ruby-saml/settings.rb
Instance Attribute Summary collapse
-
#assertion_consumer_logout_service_binding ⇒ Object
Returns the value of attribute assertion_consumer_logout_service_binding.
-
#assertion_consumer_logout_service_url ⇒ Object
Compability.
-
#assertion_consumer_service_binding ⇒ Object
Returns the value of attribute assertion_consumer_service_binding.
-
#assertion_consumer_service_url ⇒ Object
Returns the value of attribute assertion_consumer_service_url.
-
#attribute_consuming_service ⇒ Object
readonly
Returns the value of attribute attribute_consuming_service.
-
#attributes_index ⇒ Object
Returns the value of attribute attributes_index.
-
#authn_context ⇒ Object
Returns the value of attribute authn_context.
-
#authn_context_comparison ⇒ Object
Returns the value of attribute authn_context_comparison.
-
#authn_context_decl_ref ⇒ Object
Returns the value of attribute authn_context_decl_ref.
-
#certificate ⇒ Object
Returns the value of attribute certificate.
-
#compress_request ⇒ Object
Returns the value of attribute compress_request.
-
#compress_response ⇒ Object
Returns the value of attribute compress_response.
-
#double_quote_xml_attribute_values ⇒ Object
Returns the value of attribute double_quote_xml_attribute_values.
-
#force_authn ⇒ Object
Returns the value of attribute force_authn.
-
#idp_cert ⇒ Object
Returns the value of attribute idp_cert.
-
#idp_cert_fingerprint ⇒ Object
Returns the value of attribute idp_cert_fingerprint.
-
#idp_entity_id ⇒ Object
IdP Data.
-
#idp_slo_target_url ⇒ Object
Returns the value of attribute idp_slo_target_url.
-
#idp_sso_target_url ⇒ Object
Returns the value of attribute idp_sso_target_url.
-
#issuer ⇒ Object
SP Data.
-
#name_identifier_format ⇒ Object
Returns the value of attribute name_identifier_format.
-
#name_identifier_value ⇒ Object
Returns the value of attribute name_identifier_value.
-
#passive ⇒ Object
Returns the value of attribute passive.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#protocol_binding ⇒ Object
Returns the value of attribute protocol_binding.
-
#security ⇒ Object
Returns the value of attribute security.
-
#sessionindex ⇒ Object
Returns the value of attribute sessionindex.
-
#sp_name_qualifier ⇒ Object
Returns the value of attribute sp_name_qualifier.
Instance Method Summary collapse
- #get_sp_cert ⇒ Object
- #get_sp_key ⇒ Object
-
#initialize(overrides = {}) ⇒ Settings
constructor
A new instance of Settings.
- #single_logout_service_binding ⇒ Object
-
#single_logout_service_binding=(val) ⇒ Object
setter.
- #single_logout_service_url ⇒ Object
-
#single_logout_service_url=(val) ⇒ Object
setter.
Constructor Details
#initialize(overrides = {}) ⇒ Settings
Returns a new instance of Settings.
4 5 6 7 8 9 10 11 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 4 def initialize(overrides = {}) config = DEFAULTS.merge(overrides) config.each do |k,v| acc = "#{k.to_s}=".to_sym self.send(acc, v) if self.respond_to? acc end @attribute_consuming_service = AttributeService.new end |
Instance Attribute Details
#assertion_consumer_logout_service_binding ⇒ Object
Returns the value of attribute assertion_consumer_logout_service_binding.
43 44 45 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 43 def assertion_consumer_logout_service_binding @assertion_consumer_logout_service_binding end |
#assertion_consumer_logout_service_url ⇒ Object
Compability
42 43 44 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 42 def assertion_consumer_logout_service_url @assertion_consumer_logout_service_url end |
#assertion_consumer_service_binding ⇒ Object
Returns the value of attribute assertion_consumer_service_binding.
22 23 24 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 22 def assertion_consumer_service_binding @assertion_consumer_service_binding end |
#assertion_consumer_service_url ⇒ Object
Returns the value of attribute assertion_consumer_service_url.
21 22 23 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 21 def assertion_consumer_service_url @assertion_consumer_service_url end |
#attribute_consuming_service ⇒ Object (readonly)
Returns the value of attribute attribute_consuming_service.
40 41 42 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 40 def attribute_consuming_service @attribute_consuming_service end |
#attributes_index ⇒ Object
Returns the value of attribute attributes_index.
32 33 34 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 32 def attributes_index @attributes_index end |
#authn_context ⇒ Object
Returns the value of attribute authn_context.
37 38 39 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 37 def authn_context @authn_context end |
#authn_context_comparison ⇒ Object
Returns the value of attribute authn_context_comparison.
38 39 40 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 38 def authn_context_comparison @authn_context_comparison end |
#authn_context_decl_ref ⇒ Object
Returns the value of attribute authn_context_decl_ref.
39 40 41 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 39 def authn_context_decl_ref @authn_context_decl_ref end |
#certificate ⇒ Object
Returns the value of attribute certificate.
35 36 37 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 35 def certificate @certificate end |
#compress_request ⇒ Object
Returns the value of attribute compress_request.
27 28 29 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 27 def compress_request @compress_request end |
#compress_response ⇒ Object
Returns the value of attribute compress_response.
28 29 30 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 28 def compress_response @compress_response end |
#double_quote_xml_attribute_values ⇒ Object
Returns the value of attribute double_quote_xml_attribute_values.
29 30 31 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 29 def double_quote_xml_attribute_values @double_quote_xml_attribute_values end |
#force_authn ⇒ Object
Returns the value of attribute force_authn.
33 34 35 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 33 def force_authn @force_authn end |
#idp_cert ⇒ Object
Returns the value of attribute idp_cert.
17 18 19 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 17 def idp_cert @idp_cert end |
#idp_cert_fingerprint ⇒ Object
Returns the value of attribute idp_cert_fingerprint.
18 19 20 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 18 def idp_cert_fingerprint @idp_cert_fingerprint end |
#idp_entity_id ⇒ Object
IdP Data
14 15 16 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 14 def idp_entity_id @idp_entity_id end |
#idp_slo_target_url ⇒ Object
Returns the value of attribute idp_slo_target_url.
16 17 18 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 16 def idp_slo_target_url @idp_slo_target_url end |
#idp_sso_target_url ⇒ Object
Returns the value of attribute idp_sso_target_url.
15 16 17 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 15 def idp_sso_target_url @idp_sso_target_url end |
#issuer ⇒ Object
SP Data
20 21 22 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 20 def issuer @issuer end |
#name_identifier_format ⇒ Object
Returns the value of attribute name_identifier_format.
24 25 26 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 24 def name_identifier_format @name_identifier_format end |
#name_identifier_value ⇒ Object
Returns the value of attribute name_identifier_value.
25 26 27 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 25 def name_identifier_value @name_identifier_value end |
#passive ⇒ Object
Returns the value of attribute passive.
30 31 32 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 30 def passive @passive end |
#private_key ⇒ Object
Returns the value of attribute private_key.
36 37 38 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 36 def private_key @private_key end |
#protocol_binding ⇒ Object
Returns the value of attribute protocol_binding.
31 32 33 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 31 def protocol_binding @protocol_binding end |
#security ⇒ Object
Returns the value of attribute security.
34 35 36 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 34 def security @security end |
#sessionindex ⇒ Object
Returns the value of attribute sessionindex.
26 27 28 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 26 def sessionindex @sessionindex end |
#sp_name_qualifier ⇒ Object
Returns the value of attribute sp_name_qualifier.
23 24 25 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 23 def sp_name_qualifier @sp_name_qualifier end |
Instance Method Details
#get_sp_cert ⇒ Object
79 80 81 82 83 84 85 86 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 79 def get_sp_cert cert = nil if self.certificate formated_cert = OneLogin::RubySaml::Utils.format_cert(self.certificate) cert = OpenSSL::X509::Certificate.new(formated_cert) end cert end |
#get_sp_key ⇒ Object
88 89 90 91 92 93 94 95 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 88 def get_sp_key private_key = nil if self.private_key formated_private_key = OneLogin::RubySaml::Utils.format_private_key(self.private_key) private_key = OpenSSL::PKey::RSA.new(formated_private_key) end private_key end |
#single_logout_service_binding ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 62 def single_logout_service_binding() val = nil if @single_logout_service_binding.nil? if @assertion_consumer_logout_service_binding val = @assertion_consumer_logout_service_binding end else val = @single_logout_service_binding end val end |
#single_logout_service_binding=(val) ⇒ Object
setter
75 76 77 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 75 def single_logout_service_binding=(val) @single_logout_service_binding = val end |
#single_logout_service_url ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 45 def single_logout_service_url() val = nil if @single_logout_service_url.nil? if @assertion_consumer_logout_service_url val = @assertion_consumer_logout_service_url end else val = @single_logout_service_url end val end |
#single_logout_service_url=(val) ⇒ Object
setter
58 59 60 |
# File 'lib/onelogin/ruby-saml/settings.rb', line 58 def single_logout_service_url=(val) @single_logout_service_url = val end |