Skip to content

Commit

Permalink
Cleaning up some missing printlns
Browse files Browse the repository at this point in the history
  • Loading branch information
Xemdo committed Jan 4, 2024
1 parent 1478dcf commit 60cb6a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ func loginCmdRun(cmd *cobra.Command, args []string) error {
return fmt.Errorf("%v\n%v", err.Error(), errDescription)
}

fmt.Printf("%v", resp)
lightYellow := color.New(color.FgHiYellow).SprintfFunc()

log.Println("Successfully refreshed Access Token.")
log.Println(lightYellow("Access Token: ") + resp.Response.AccessToken)
log.Println(lightYellow("Refresh Token: ") + resp.Response.RefreshToken)
log.Println(lightYellow("Expires At: ") + resp.ExpiresAt.String())

} else if isUserToken {
p.URL = login.UserCredentialsURL
Expand Down Expand Up @@ -182,6 +187,8 @@ func loginCmdRun(cmd *cobra.Command, args []string) error {

log.Println("Successfully generated App Access Token.")
log.Println(lightYellow("App Access Token: ") + resp.Response.AccessToken)
log.Println(lightYellow("Expires At: ") + resp.ExpiresAt.String())
log.Println(lightYellow("Scopes: ") + fmt.Sprintf("%v", resp.Response.Scope))
}

return nil
Expand Down

0 comments on commit 60cb6a2

Please sign in to comment.