class Rack::Saml::OneloginResponse

Public Class Methods

new(request, config, metadata) click to toggle source

extend Forwardable

Calls superclass method Rack::Saml::AbstractResponse::new
# File lib/rack/saml/response/onelogin_response.rb, line 9
def initialize(request, config, metadata)
  super(request, config, metadata)
  @response = OneLogin::RubySaml::Response.new(@request.params['SAMLResponse'], {
    :allowed_clock_drift => config['allowed_clock_drift'],
    :settings => saml_settings
  })
end

Public Instance Methods

attributes() click to toggle source
# File lib/rack/saml/response/onelogin_response.rb, line 29
def attributes
  @response.attributes
end
is_valid?() click to toggle source
# File lib/rack/saml/response/onelogin_response.rb, line 17
def is_valid?
  begin
    if config['validation_error']
      @response.validate!
    else
      @response.is_valid?
    end
  rescue OneLogin::RubySaml::ValidationError => e
    raise ValidationError.new(e.message)
  end
end