Skip to content

Commit

Permalink
refactor: move oauth to it's own module
Browse files Browse the repository at this point in the history
  • Loading branch information
HandOfGod94 committed Oct 22, 2023
1 parent 5643424 commit 88e562b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cmd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"

"github.com/fatih/color"
"github.com/handofgod94/gh-jira-changelog/pkg/jira_changelog/jira/auth"
"github.com/handofgod94/gh-jira-changelog/pkg/jira_changelog/jira/auth/oauth"
"github.com/spf13/cobra"
)

Expand All @@ -22,7 +22,7 @@ as Atlassian currently doesn't support PKCE verification for oauth flow.`,
RunE: func(cmd *cobra.Command, args []string) error {
switch args[0] {
case "login":
a := auth.NewAuthenticator()
a := oauth.NewAuthenticator()
if err := a.Login(context.Background()); err != nil {
fmt.Fprintln(os.Stderr, color.RedString("Login attempt failed. Please try again"))
return err
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package auth
package api_token

import "net/http"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package auth
package oauth

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package auth
package oauth

import (
"encoding/json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package auth
package oauth

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package auth
package oauth

import (
"time"
Expand Down

0 comments on commit 88e562b

Please sign in to comment.