class SamlIdp::SamlResponse

Attributes

algorithm[RW]
assertion_with_signature[RW]
audience_uri[RW]
authn_context_classref[RW]
encryption_opts[RW]
expiry[RW]
issuer_uri[RW]
principal[RW]
reference_id[RW]
response_id[RW]
saml_acs_url[RW]
saml_request_id[RW]
secret_key[RW]
x509_certificate[RW]

Public Class Methods

new(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 ) click to toggle source
# 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

Public Instance Methods

build() click to toggle source
# File lib/saml_idp/saml_response.rb, line 47
def build
  @built ||= response_builder.encoded
end

Private Instance Methods

assertion_builder() click to toggle source
# File lib/saml_idp/saml_response.rb, line 65
def assertion_builder
  @assertion_builder ||= AssertionBuilder.new reference_id,
    issuer_uri,
    principal,
    audience_uri,
    saml_request_id,
    saml_acs_url,
    algorithm,
    authn_context_classref,
    expiry,
    encryption_opts
end
response_builder() click to toggle source
# File lib/saml_idp/saml_response.rb, line 60
def response_builder
  ResponseBuilder.new(response_id, issuer_uri, saml_acs_url, saml_request_id, signed_assertion)
end
signed_assertion() click to toggle source
# File lib/saml_idp/saml_response.rb, line 51
def signed_assertion
  if encryption_opts
    assertion_builder.encrypt(sign: true)
  else
    assertion_builder.signed
  end
end