log more in authorizations controller :(

This commit is contained in:
Maxwell Salzberg 2012-04-15 17:03:09 -07:00
parent f7d1f0d9b9
commit b0e4c477bf

View file

@ -54,9 +54,15 @@ class AuthorizationsController < ApplicationController
return
end
packaged_manifest = JSON.parse(RestClient.get("#{app_url}manifest.json").body)
public_key = OpenSSL::PKey::RSA.new(packaged_manifest['public_key'])
manifest = JWT.decode(packaged_manifest['jwt'], public_key)
begin
packaged_manifest = JSON.parse(RestClient.get("#{app_url}manifest.json").body)
public_key = OpenSSL::PKey::RSA.new(packaged_manifest['public_key'])
manifest = JWT.decode(packaged_manifest['jwt'], public_key)
rescue => e
puts "there was a problem with getting a token for the following diaspora id"
puts "#{app_url}, #{public_key.to_s} #{manifest.to_s}"
raise e
end
message = verify(signed_string, Base64.decode64(params[:signature]), public_key, manifest)
if not (message =='ok')