Class: Onelogin::Saml::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/onelogin/saml/settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(atts = {}) ⇒ Settings

Returns a new instance of Settings.



4
5
6
7
8
9
10
# File 'lib/onelogin/saml/settings.rb', line 4

def initialize(atts={})
  atts.each do |key, val|
    if self.respond_to? "#{key}="
      self.send "#{key}=", val
    end
  end
end

Instance Attribute Details

#assertion_consumer_service_urlObject

The URL at which the SAML assertion should be received.



13
14
15
# File 'lib/onelogin/saml/settings.rb', line 13

def assertion_consumer_service_url
  @assertion_consumer_service_url
end

#idp_cert_fingerprintObject

The certificate fingerprint. This is provided from the identity provider when setting up the relationship.



31
32
33
# File 'lib/onelogin/saml/settings.rb', line 31

def idp_cert_fingerprint
  @idp_cert_fingerprint
end

#idp_slo_target_urlObject

The IdP URL to which the logout request should be sent.



28
29
30
# File 'lib/onelogin/saml/settings.rb', line 28

def idp_slo_target_url
  @idp_slo_target_url
end

#idp_sso_target_urlObject

The IdP URL to which the authentication request should be sent.



25
26
27
# File 'lib/onelogin/saml/settings.rb', line 25

def idp_sso_target_url
  @idp_sso_target_url
end

#issuerObject

The name of your application.



16
17
18
# File 'lib/onelogin/saml/settings.rb', line 16

def issuer
  @issuer
end

#loggerObject

Logger



19
20
21
# File 'lib/onelogin/saml/settings.rb', line 19

def logger
  @logger
end

#name_identifier_formatObject

Describes the format of the username required by this application. For email: Onelogin::Saml::NameIdentifiers::EMAIL



35
36
37
# File 'lib/onelogin/saml/settings.rb', line 35

def name_identifier_format
  @name_identifier_format
end

#relay_stateObject

The relay state to use when generating assertions.



41
42
43
# File 'lib/onelogin/saml/settings.rb', line 41

def relay_state
  @relay_state
end

#requested_authn_contextObject

The type of authentication requested (see Onelogin::Saml::AuthnContexts)



38
39
40
# File 'lib/onelogin/saml/settings.rb', line 38

def requested_authn_context
  @requested_authn_context
end

#sp_name_qualifierObject

Returns the value of attribute sp_name_qualifier.



22
23
24
# File 'lib/onelogin/saml/settings.rb', line 22

def sp_name_qualifier
  @sp_name_qualifier
end

#sp_slo_urlObject

The logout url of your application



46
47
48
# File 'lib/onelogin/saml/settings.rb', line 46

def sp_slo_url
  @sp_slo_url
end

#tech_contact_emailObject

The email of the technical contact for your application



52
53
54
# File 'lib/onelogin/saml/settings.rb', line 52

def tech_contact_email
  @tech_contact_email
end

#tech_contact_nameObject

The name of the technical contact for your application



49
50
51
# File 'lib/onelogin/saml/settings.rb', line 49

def tech_contact_name
  @tech_contact_name
end

#xmlsec_additional_privatekeysObject

Additional private keys to attempt decryption with To be used for key rotation



64
65
66
# File 'lib/onelogin/saml/settings.rb', line 64

def xmlsec_additional_privatekeys
  @xmlsec_additional_privatekeys
end

#xmlsec_certificateObject

The PEM-encoded certificate



57
58
59
# File 'lib/onelogin/saml/settings.rb', line 57

def xmlsec_certificate
  @xmlsec_certificate
end

#xmlsec_privatekeyObject

The PEM-encoded private key



60
61
62
# File 'lib/onelogin/saml/settings.rb', line 60

def xmlsec_privatekey
  @xmlsec_privatekey
end

Instance Method Details

#all_private_keysObject



66
67
68
# File 'lib/onelogin/saml/settings.rb', line 66

def all_private_keys
  Array(xmlsec_additional_privatekeys).unshift(xmlsec_privatekey).compact
end

#encryption_configured?Boolean

Returns:

  • (Boolean)


70
71
72
# File 'lib/onelogin/saml/settings.rb', line 70

def encryption_configured?
  !!self.xmlsec_privatekey
end

#sign?Boolean

Returns:

  • (Boolean)


74
75
76
# File 'lib/onelogin/saml/settings.rb', line 74

def sign?
  !!self.xmlsec_privatekey
end