go-hep.org/x/hep@v0.38.1/xrootd/login.go (about) 1 // Copyright ©2018 The go-hep Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package xrootd // import "go-hep.org/x/hep/xrootd" 6 7 import ( 8 "context" 9 10 "go-hep.org/x/hep/xrootd/xrdproto/login" 11 ) 12 13 // Login initializes a server connection using username 14 // and token which can be supplied by the previous redirection response. 15 func (sess *cliSession) Login(ctx context.Context, username, token string) (login.Response, error) { 16 var resp login.Response 17 _, err := sess.Send(ctx, &resp, login.NewRequest(username, token)) 18 // TODO: should we react somehow to redirection? 19 return resp, err 20 }