lib/omniauth/polaris/adaptor.rb in omniauth-polaris-1.1.0 vs lib/omniauth/polaris/adaptor.rb in omniauth-polaris-1.1.1
- old
+ new
@@ -36,11 +36,11 @@
access_key: @access_key,
access_id: @access_id
}
ensure_method!(@method)
- @polaris_method = METHOD[@method]
+ @polaris_method = METHOD[@method.to_s.to_sym]
end
def authenticate_patron(pin:, barcode:)
# According to the polaris api docs "Date must be within +/- 30 minutes of current time or request will fail"
http_date = 15.minutes.from_now.in_time_zone('GMT').strftime('%a, %d %b %Y %H:%M:%S %Z')
@@ -61,17 +61,17 @@
end
protected
def authorization_response(pin, barcode, request_date)
- patron_validate_uri = "#{@http_uri}/patron/#{barcode}"
+ patron_validate_uri = "#{@http_uri}#{barcode}"
validation_concated_string = "#{@polaris_method}#{patron_validate_uri}#{request_date}#{pin}"
polaris_get_xml_response(patron_validate_uri, request_date, validation_concated_string)
end
def details_response(pin, barcode, request_date)
patron_basic_data_uri = "#{@http_uri}#{barcode}/basicdata"
- details_concated_string = "#{@polaris_method}#{http_basic_data_uri}#{request_date}#{pin}"
+ details_concated_string = "#{@polaris_method}#{patron_basic_data_uri}#{request_date}#{pin}"
polaris_get_xml_response(patron_basic_data_uri, request_date, details_concated_string)
end
private