log more in authorizations controller :(
This commit is contained in:
parent
f7d1f0d9b9
commit
b0e4c477bf
1 changed files with 9 additions and 3 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue