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) ⇒ SamlResponse

Returns a new instance of SamlResponse.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/saml_idp/saml_response.rb', line 20

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
      )
  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
end

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm.



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

def algorithm
  @algorithm
end

#assertion_with_signatureObject

Returns the value of attribute assertion_with_signature.



5
6
7
# File 'lib/saml_idp/saml_response.rb', line 5

def assertion_with_signature
  @assertion_with_signature
end

#audience_uriObject

Returns the value of attribute audience_uri.



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

def audience_uri
  @audience_uri
end

#authn_context_classrefObject

Returns the value of attribute authn_context_classref.



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

def authn_context_classref
  @authn_context_classref
end

#encryption_optsObject

Returns the value of attribute encryption_opts.



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

def encryption_opts
  @encryption_opts
end

#expiryObject

Returns the value of attribute expiry.



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

def expiry
  @expiry
end

#issuer_uriObject

Returns the value of attribute issuer_uri.



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

def issuer_uri
  @issuer_uri
end

#principalObject

Returns the value of attribute principal.



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

def principal
  @principal
end

#reference_idObject

Returns the value of attribute reference_id.



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

def reference_id
  @reference_id
end

#response_idObject

Returns the value of attribute response_id.



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

def response_id
  @response_id
end

#saml_acs_urlObject

Returns the value of attribute saml_acs_url.



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

def saml_acs_url
  @saml_acs_url
end

#saml_request_idObject

Returns the value of attribute saml_request_id.



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

def saml_request_id
  @saml_request_id
end

#secret_keyObject

Returns the value of attribute secret_key.



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

def secret_key
  @secret_key
end

#x509_certificateObject

Returns the value of attribute x509_certificate.



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

def x509_certificate
  @x509_certificate
end

Instance Method Details

#buildObject



47
48
49
# File 'lib/saml_idp/saml_response.rb', line 47

def build
  @built ||= response_builder.encoded
end