authorize: refactor to use new config interfaces #5178

This commit is contained in:
Nick Craig-Wood 2021-04-03 15:38:12 +01:00
parent 1a41c930f3
commit b9fd02039b
2 changed files with 30 additions and 22 deletions

View file

@ -526,14 +526,6 @@ version recommended):
return errors.Wrap(err, "failed to get token")
}
// Print code if we are doing a manual auth
if authorizeOnly {
result, err := json.Marshal(token)
if err != nil {
return errors.Wrap(err, "failed to marshal token")
}
fmt.Printf("Paste the following into your remote machine --->\n%s\n<---End paste\n", result)
}
return PutToken(name, m, token, true)
}