addressing https://dev.arvados.org/issues/17014#note-41
authorNico Cesar <nico@nicocesar.com>
Thu, 21 Jan 2021 01:35:36 +0000 (20:35 -0500)
committerNico Cesar <nico@nicocesar.com>
Thu, 21 Jan 2021 01:39:36 +0000 (20:39 -0500)
Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico@curii.com>

lib/controller/integration_test.go
lib/controller/rpc/conn.go
services/api/app/controllers/user_sessions_controller.rb

index a574f3978052538a3efcf642710cc208f2de9e4e..b240c216cce2c0f249e8a22b48c7413aa4febbfa 100644 (file)
@@ -21,7 +21,6 @@ import (
        "path/filepath"
        "strconv"
        "strings"
-       "time"
 
        "git.arvados.org/arvados.git/lib/boot"
        "git.arvados.org/arvados.git/lib/config"
@@ -211,7 +210,6 @@ func (s *IntegrationSuite) userClients(rootctx context.Context, c *check.C, conn
                        FirstName: "Example",
                        LastName:  "User",
                        Username:  "example",
-                       ExpiresAt: time.Now().Add(1 * time.Hour),
                },
        })
        c.Assert(err, check.IsNil)
index 455c20fa91ed48be4ba778afafabcc7b09d7e857..d9d24260bbc98e617b62083f2bb3dd899d59995a 100644 (file)
@@ -469,7 +469,6 @@ type UserSessionCreateOptions struct {
 
 func (conn *Conn) UserSessionCreate(ctx context.Context, options UserSessionCreateOptions) (arvados.LoginResponse, error) {
        ep := arvados.APIEndpoint{Method: "POST", Path: "auth/controller/callback"}
-       // if ExpiresAt is empty value then add 2 hour expiration
        var resp arvados.LoginResponse
        err := conn.requestAndDecode(ctx, &resp, ep, nil, options)
        return resp, err
index 3d109c49ca02cf4c5c7e904f08b1bb63b8a1567f..da0523d2b0e54f01c24130b31e9f222c07a81889 100644 (file)
@@ -116,7 +116,7 @@ class UserSessionsController < ApplicationController
       # FIXME: if current_user has never authorized this app before,
       # ask for confirmation here!
 
-      return send_api_token_to(params[:return_to], current_user, params[:remote], params[:expires_at])
+      return send_api_token_to(params[:return_to], current_user, params[:remote])
     end
     p = []
     p << "auth_provider=#{CGI.escape(params[:auth_provider])}" if params[:auth_provider]