Skip to content

Commit

Permalink
Merge pull request #357 from richard-cox/fix-local-auth-val-end
Browse files Browse the repository at this point in the history
Ensure we use an endpoint that requires auth when checking creds
  • Loading branch information
richard-cox authored Nov 3, 2023
2 parents 0a97f95 + f7ec210 commit a0870f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/jetstream/authepinio.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (a *epinioAuth) verifyLocalLoginCreds(username, password string) error {
}

// Make a request to the epinio endpoint that requires auth
credsUrl := fmt.Sprintf("%s/api/v1/info", epinioEndpoint.APIEndpoint.String())
credsUrl := fmt.Sprintf("%s/api/v1/me", epinioEndpoint.APIEndpoint.String())

req, err := http.NewRequest("GET", credsUrl, nil)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/jetstream/plugins/epinio/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (epinio *Epinio) Register(echoContext echo.Context) error {
func (epinio *Epinio) Validate(userGUID string, cnsiRecord interfaces.CNSIRecord, tokenRecord interfaces.TokenRecord) error {
// Validate is used to confirm the user's creds after the user connects
// For this flow we don't need to do this, it was done when the user logs in in authepinio
// (makes a request to `/api/v1/info`)
// (makes a request to `/api/v1/me`)
return nil
}

Expand Down

0 comments on commit a0870f8

Please sign in to comment.