[ARVADOS] updated: 2.1.0-256-gb8ca04814

Git user git at public.arvados.org
Mon Jan 11 21:05:05 UTC 2021


Summary of changes:
 services/api/app/controllers/user_sessions_controller.rb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

       via  b8ca048149f4cc2df284b409ffc254f17b1865c3 (commit)
      from  e00aec9b399e249b3b8c022364f2d7eb4b2d1640 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b8ca048149f4cc2df284b409ffc254f17b1865c3
Author: Nico Cesar <nico at nicocesar.com>
Date:   Mon Jan 11 16:04:26 2021 -0500

    passing expires_at to send_api_token_to()
    
    Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico at curii.com>

diff --git a/services/api/app/controllers/user_sessions_controller.rb b/services/api/app/controllers/user_sessions_controller.rb
index 0bf939d08..9611da84d 100644
--- a/services/api/app/controllers/user_sessions_controller.rb
+++ b/services/api/app/controllers/user_sessions_controller.rb
@@ -80,7 +80,7 @@ class UserSessionsController < ApplicationController
         return send_error 'Invalid remote cluster id', status: 400
       end
       remote = nil if remote == ''
-      return send_api_token_to(return_to_url, user, remote)
+      return send_api_token_to(return_to_url, user, remote, params[:expires_at])
     end
     redirect_to @redirect_to
   end
@@ -144,7 +144,7 @@ class UserSessionsController < ApplicationController
     end
   end
 
-  def send_api_token_to(callback_url, user, remote=nil)
+  def send_api_token_to(callback_url, user, remote=nil, token_expiration=nil)
     # Give the API client a token for making API calls on behalf of
     # the authenticated user
 
@@ -155,7 +155,6 @@ class UserSessionsController < ApplicationController
         find_or_create_by(url_prefix: api_client_url_prefix)
     end
 
-    token_expiration = nil
     if Rails.configuration.Login.TokenLifetime > 0
       token_expiration = Time.now + Rails.configuration.Login.TokenLifetime
     end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list