Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (16 sloc) 675 Bytes
// Copyright 2018 The go-hep Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package xrootd // import ""
import (
// Login initializes a server connection using username
// and token which can be supplied by the previous redirection response.
func (sess *cliSession) Login(ctx context.Context, username, token string) (login.Response, error) {
var resp login.Response
_, err := sess.Send(ctx, &resp, login.NewRequest(username, token))
// TODO: should we react somehow to redirection?
return resp, err