Skip to content
Extraits de code Groupes Projets
Valider b0e4c477 rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

log more in authorizations controller :(

parent f7d1f0d9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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')
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter