gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[reclaim-oidc] 08/18: old style posts


From: gnunet
Subject: [reclaim-oidc] 08/18: old style posts
Date: Sat, 12 Jun 2021 00:40:44 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository reclaim-oidc.

commit e714c87047ba7b3ea267d35e615842732f075386
Author: Schanzenbach, Martin <mschanzenbach@posteo.de>
AuthorDate: Sun Apr 28 19:43:30 2019 +0200

    old style posts
---
 lib/reclaim_oidc.rb | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/lib/reclaim_oidc.rb b/lib/reclaim_oidc.rb
index aaa217a..4ba55aa 100644
--- a/lib/reclaim_oidc.rb
+++ b/lib/reclaim_oidc.rb
@@ -42,20 +42,32 @@ class ReclaimOidc
     raise if redirect_uri.nil? or description.nil? or name.nil?
     uri = URI(@url + '/identity')
     payload = {'name' => "#{name}"}.to_json
-    resp = Net::HTTP.post(uri, payload)
+    #resp = Net::HTTP.post(uri, payload)
+    req = Net:HTTP::Post.new(uri, payload)
+    Net::HTTP.start(uri.host, uri.port) do |http|
+      resp = http.request req
+    end
     uri = URI(@url + "/namestore/#{name}")
     record = {'record_type' => "RECLAIM_OIDC_CLIENT",
               'value' => description,
               'record_name' => "@",
               'expiration_time' => "1d",
               'flag' => 8}
-    resp = Net::HTTP.post(uri,record.to_json)
+    #resp = Net::HTTP.post(uri,record.to_json)
+    req = Net:HTTP::Post.new(uri, record.to_json)
+    Net::HTTP.start(uri.host, uri.port) do |http|
+      resp = http.request req
+    end
     record = {'record_type' => "RECLAIM_OIDC_REDIRECT",
               'value' => redirect_uri,
               'record_name' => "@",
               'expiration_time' => "1d",
               'flag' => 8}
-    resp = Net::HTTP.post(uri,record.to_json)
+    req = Net:HTTP::Post.new(uri, record.to_json)
+    #resp = Net::HTTP.post(uri,record.to_json)
+    Net::HTTP.start(uri.host, uri.port) do |http|
+      resp = http.request req
+    end
   end
   def delete_client(name)
     raise if name.nil?

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]