Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #243 from s1cyan/cryptic
Browse files Browse the repository at this point in the history
login fix
  • Loading branch information
davco01a authored Jan 28, 2021
2 parents 196bc34 + d1eac8c commit b76a3d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import (
"github.com/kabanero-io/kabanero-command-line/pkg/security"
"github.com/spf13/cobra"

"encoding/base64"

"github.com/spf13/viper"
"golang.org/x/crypto/ssh/terminal"
)
Expand Down Expand Up @@ -186,8 +188,9 @@ var loginCmd = &cobra.Command{
HandleTLSFLag(InsecureTLS)

kabLoginURL = getRESTEndpoint("login")

requestBody, _ := json.Marshal(map[string]string{"gituser": username, "gitpat": password})
ePass := base64.StdEncoding.EncodeToString([]byte(password))
eUser := base64.StdEncoding.EncodeToString([]byte(username))
requestBody, _ := json.Marshal(map[string]string{"000_ERG_TEN_TWENTY": eUser, "010_BOHM_THIRTY_FIVE": ePass})

resp, err := sendHTTPRequest("POST", kabLoginURL, requestBody)
if err != nil {
Expand Down

0 comments on commit b76a3d6

Please sign in to comment.