Class: Samlurai::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/samlurai/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/samlurai/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/samlurai/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.



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

def idp_cert_fingerprint
  @idp_cert_fingerprint
end

#idp_slo_target_urlObject

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



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

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.



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

def idp_sso_target_url
  @idp_sso_target_url
end

#issuerObject

The name of your application.



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

def issuer
  @issuer
end

#name_identifier_formatObject

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



32
33
34
# File 'lib/samlurai/settings.rb', line 32

def name_identifier_format
  @name_identifier_format
end

#requested_authn_contextObject

The type of authentication requested (see Samlurai::AuthnContexts)



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

def requested_authn_context
  @requested_authn_context
end

#sp_name_qualifierObject

Returns the value of attribute sp_name_qualifier.



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

def sp_name_qualifier
  @sp_name_qualifier
end

#sp_slo_urlObject

The logout url of your application



40
41
42
# File 'lib/samlurai/settings.rb', line 40

def sp_slo_url
  @sp_slo_url
end

#tech_contact_emailObject

The email of the technical contact for your application



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

def tech_contact_email
  @tech_contact_email
end

#tech_contact_nameObject

The name of the technical contact for your application



43
44
45
# File 'lib/samlurai/settings.rb', line 43

def tech_contact_name
  @tech_contact_name
end

#xmlsec_certificateObject

The PEM-encoded certificate



51
52
53
# File 'lib/samlurai/settings.rb', line 51

def xmlsec_certificate
  @xmlsec_certificate
end

#xmlsec_privatekeyObject

The PEM-encoded private key



54
55
56
# File 'lib/samlurai/settings.rb', line 54

def xmlsec_privatekey
  @xmlsec_privatekey
end

Instance Method Details

#encryption_configured?Boolean

Returns:

  • (Boolean)


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

def encryption_configured?
  !!self.xmlsec_privatekey
end

#sign?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/samlurai/settings.rb', line 56

def sign?
  !!self.xmlsec_privatekey
end