Class: Spid::Saml2::ServiceProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/spid/saml2/service_provider.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host:, acs_path:, acs_binding:, slo_path:, slo_binding:, metadata_path:, private_key:, certificate:, digest_method:, signature_method:, attribute_services:) ⇒ ServiceProvider

rubocop:disable Metrics/ParameterLists rubocop:disable Metrics/MethodLength



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/spid/saml2/service_provider.rb', line 22

def initialize(
      host:,
      acs_path:,
      acs_binding:,
      slo_path:,
      slo_binding:,
      metadata_path:,
      private_key:,
      certificate:,
      digest_method:,
      signature_method:,
      attribute_services:
    )
  @host = host
  @acs_path               = acs_path
  @acs_binding            = acs_binding
  @slo_path               = slo_path
  @slo_binding            = slo_binding
  @metadata_path          = 
  @private_key            = private_key
  @certificate            = certificate
  @digest_method          = digest_method
  @signature_method       = signature_method
  @attribute_services     = attribute_services
  validate_digest_methods
  validate_attributes
  validate_private_key
  validate_certificate
end

Instance Attribute Details

#acs_bindingObject (readonly)

Returns the value of attribute acs_binding.



10
11
12
# File 'lib/spid/saml2/service_provider.rb', line 10

def acs_binding
  @acs_binding
end

#acs_pathObject (readonly)

Returns the value of attribute acs_path.



9
10
11
# File 'lib/spid/saml2/service_provider.rb', line 9

def acs_path
  @acs_path
end

#attribute_servicesObject (readonly)

Returns the value of attribute attribute_services.



18
19
20
# File 'lib/spid/saml2/service_provider.rb', line 18

def attribute_services
  @attribute_services
end

#certificateObject (readonly)

Returns the value of attribute certificate.



15
16
17
# File 'lib/spid/saml2/service_provider.rb', line 15

def certificate
  @certificate
end

#digest_methodObject (readonly)

Returns the value of attribute digest_method.



16
17
18
# File 'lib/spid/saml2/service_provider.rb', line 16

def digest_method
  @digest_method
end

#hostObject (readonly)

Returns the value of attribute host.



8
9
10
# File 'lib/spid/saml2/service_provider.rb', line 8

def host
  @host
end

#metadata_pathObject (readonly)

Returns the value of attribute metadata_path.



13
14
15
# File 'lib/spid/saml2/service_provider.rb', line 13

def 
  @metadata_path
end

#private_keyObject (readonly)

Returns the value of attribute private_key.



14
15
16
# File 'lib/spid/saml2/service_provider.rb', line 14

def private_key
  @private_key
end

#signature_methodObject (readonly)

Returns the value of attribute signature_method.



17
18
19
# File 'lib/spid/saml2/service_provider.rb', line 17

def signature_method
  @signature_method
end

#slo_bindingObject (readonly)

Returns the value of attribute slo_binding.



12
13
14
# File 'lib/spid/saml2/service_provider.rb', line 12

def slo_binding
  @slo_binding
end

#slo_pathObject (readonly)

Returns the value of attribute slo_path.



11
12
13
# File 'lib/spid/saml2/service_provider.rb', line 11

def slo_path
  @slo_path
end

Instance Method Details

#acs_urlObject

rubocop:enable Metrics/MethodLength rubocop:enable Metrics/ParameterLists



54
55
56
# File 'lib/spid/saml2/service_provider.rb', line 54

def acs_url
  @acs_url ||= URI.join(host, acs_path).to_s
end

#metadata_urlObject



62
63
64
# File 'lib/spid/saml2/service_provider.rb', line 62

def 
  @metadata_url ||= URI.join(host, ).to_s
end

#slo_urlObject



58
59
60
# File 'lib/spid/saml2/service_provider.rb', line 58

def slo_url
  @slo_url ||= URI.join(host, slo_path).to_s
end