Separated auth from util and fixed help strings

This commit is contained in:
David Allen 2024-08-12 13:05:28 -06:00
parent dce823c6d8
commit 3287d76588
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
4 changed files with 10 additions and 11 deletions

View file

@ -7,7 +7,7 @@ import (
"os"
magellan "github.com/OpenCHAMI/magellan/internal"
"github.com/OpenCHAMI/magellan/internal/util"
"github.com/OpenCHAMI/magellan/pkg/auth"
"github.com/lestrrat-go/jwx/jwt"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
@ -30,7 +30,7 @@ var loginCmd = &cobra.Command{
// check if we have a valid JWT before starting login
if !forceLogin {
// try getting the access token from env var
testToken, err := util.LoadAccessToken(tokenPath)
testToken, err := auth.LoadAccessToken(tokenPath)
if err != nil {
log.Error().Err(err).Msgf("failed to load access token")
}