Class: SamlIdp::ResponseBuilder

Inherits:
Object
  • Object
show all
Includes:
Algorithmable, Signable
Defined in:
lib/saml_idp/response_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Signable

included, #sign, #signed

Constructor Details

#initialize(response_id, issuer_uri, saml_acs_url, saml_request_id, assertion_and_signature, raw_algorithm) ⇒ ResponseBuilder

Returns a new instance of ResponseBuilder.



17
18
19
20
21
22
23
24
# File 'lib/saml_idp/response_builder.rb', line 17

def initialize(response_id, issuer_uri, saml_acs_url, saml_request_id, assertion_and_signature, raw_algorithm)
  self.response_id = response_id
  self.issuer_uri = issuer_uri
  self.saml_acs_url = saml_acs_url
  self.saml_request_id = saml_request_id
  self.assertion_and_signature = assertion_and_signature
  self.raw_algorithm = raw_algorithm
end

Instance Attribute Details

#assertion_and_signatureObject

Returns the value of attribute assertion_and_signature.



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

def assertion_and_signature
  @assertion_and_signature
end

#issuer_uriObject

Returns the value of attribute issuer_uri.



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

def issuer_uri
  @issuer_uri
end

#raw_algorithmObject

Returns the value of attribute raw_algorithm.



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

def raw_algorithm
  @raw_algorithm
end

#response_idObject Also known as: reference_id

Returns the value of attribute response_id.



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

def response_id
  @response_id
end

#saml_acs_urlObject

Returns the value of attribute saml_acs_url.



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

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/response_builder.rb', line 11

def saml_request_id
  @saml_request_id
end

Instance Method Details

#encoded(signed_message: false, compress: false) ⇒ Object



26
27
28
# File 'lib/saml_idp/response_builder.rb', line 26

def encoded(signed_message: false, compress: false)
  @encoded ||= signed_message ? encode_signed_message(compress) : encode_raw_message(compress)
end

#rawObject



30
31
32
# File 'lib/saml_idp/response_builder.rb', line 30

def raw
  build
end