Class: SamlIdp::SamlResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reference_id, response_id, issuer_uri, principal, audience_uri, saml_request_id, saml_acs_url, algorithm, authn_context_classref, expiry = 60 * 60, encryption_opts = nil, session_expiry = 0, name_id_formats_opts = nil, asserted_attributes_opts = nil, signed_message_opts = false, signed_assertion_opts = true, compression_opts = false) ⇒ SamlResponse

Returns a new instance of SamlResponse.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/saml_idp/saml_response.rb', line 27

def initialize(
  reference_id,
  response_id,
  issuer_uri,
  principal,
  audience_uri,
  saml_request_id,
  saml_acs_url,
  algorithm,
  authn_context_classref,
  expiry = 60 * 60,
  encryption_opts = nil,
  session_expiry = 0,
  name_id_formats_opts = nil,
  asserted_attributes_opts = nil,
  signed_message_opts = false,
  signed_assertion_opts = true,
  compression_opts = false
)

  self.reference_id = reference_id
  self.response_id = response_id
  self.issuer_uri = issuer_uri
  self.principal = principal
  self.audience_uri = audience_uri
  self.saml_request_id = saml_request_id
  self.saml_acs_url = saml_acs_url
  self.algorithm = algorithm
  self.secret_key = secret_key
  self.x509_certificate = x509_certificate
  self.authn_context_classref = authn_context_classref
  self.expiry = expiry
  self.encryption_opts = encryption_opts
  self.session_expiry = session_expiry
  self.signed_message_opts = signed_message_opts
  self.name_id_formats_opts = name_id_formats_opts
  self.asserted_attributes_opts = asserted_attributes_opts
  self.signed_assertion_opts = signed_assertion_opts
  self.name_id_formats_opts = name_id_formats_opts
  self.asserted_attributes_opts = asserted_attributes_opts
  self.compression_opts = compression_opts
end

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm.



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

def algorithm
  @algorithm
end

#asserted_attributes_optsObject

Returns the value of attribute asserted_attributes_opts.



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

def asserted_attributes_opts
  @asserted_attributes_opts
end

#audience_uriObject

Returns the value of attribute audience_uri.



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

def audience_uri
  @audience_uri
end

#authn_context_classrefObject

Returns the value of attribute authn_context_classref.



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

def authn_context_classref
  @authn_context_classref
end

#compression_optsObject

Returns the value of attribute compression_opts.



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

def compression_opts
  @compression_opts
end

#encryption_optsObject

Returns the value of attribute encryption_opts.



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

def encryption_opts
  @encryption_opts
end

#expiryObject

Returns the value of attribute expiry.



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

def expiry
  @expiry
end

#issuer_uriObject

Returns the value of attribute issuer_uri.



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

def issuer_uri
  @issuer_uri
end

#name_id_formats_optsObject

Returns the value of attribute name_id_formats_opts.



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

def name_id_formats_opts
  @name_id_formats_opts
end

#principalObject

Returns the value of attribute principal.



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

def principal
  @principal
end

#reference_idObject

Returns the value of attribute reference_id.



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

def reference_id
  @reference_id
end

#response_idObject

Returns the value of attribute response_id.



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

def response_id
  @response_id
end

#saml_acs_urlObject

Returns the value of attribute saml_acs_url.



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

def saml_acs_url
  @saml_acs_url
end

#saml_request_idObject

Returns the value of attribute saml_request_id.



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

def saml_request_id
  @saml_request_id
end

#secret_keyObject

Returns the value of attribute secret_key.



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

def secret_key
  @secret_key
end

#session_expiryObject

Returns the value of attribute session_expiry.



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

def session_expiry
  @session_expiry
end

#signed_assertion_optsObject

Returns the value of attribute signed_assertion_opts.



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

def signed_assertion_opts
  @signed_assertion_opts
end

#signed_message_optsObject

Returns the value of attribute signed_message_opts.



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

def signed_message_opts
  @signed_message_opts
end

#x509_certificateObject

Returns the value of attribute x509_certificate.



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

def x509_certificate
  @x509_certificate
end

Instance Method Details

#buildObject



70
71
72
# File 'lib/saml_idp/saml_response.rb', line 70

def build
  @build ||= encoded_message
end