Skip to content

Commit

Permalink
clean up debug noise
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Bartholomew <keith.bartholomew@rackspace.com>
  • Loading branch information
Keith Bartholomew committed Feb 19, 2019
1 parent 507885d commit f6925e0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
3 changes: 0 additions & 3 deletions src/core/auth/authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,11 @@ func Callback(code string) (*models.User, error) {
h, err := getHelper()

err = dao.OnBoardUser(u)
// err = h.OnBoardUser(u)
if err != nil {
return nil, err
}

u, err = h.SearchUser(u.Username)
// u, err = dao.GetUser(models.User{Username: u.Username})
if err != nil {
return nil, err
}
Expand All @@ -197,7 +195,6 @@ func Callback(code string) (*models.User, error) {
return nil, fmt.Errorf("no user found")
}

log.Debugf("FROM CALLBACK: %+v", u)
return u, nil
}

Expand Down
19 changes: 0 additions & 19 deletions src/core/auth/oidc/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,6 @@ import (
"github.com/coreos/go-oidc/oauth2"
)

// type AuthenticateHelper interface {

// // Authenticate authenticate the user based on data in m. Only when the error returned is an instance
// // of ErrAuth, it will be considered a bad credentials, other errors will be treated as server side error.
// Authenticate(m models.AuthModel) (*models.User, error)
// // OnBoardUser will check if a user exists in user table, if not insert the user and
// // put the id in the pointer of user model, if it does exist, fill in the user model based
// // on the data record of the user
// OnBoardUser(u *models.User) error
// // Create a group in harbor DB, if altGroupName is not empty, take the altGroupName as groupName in harbor DB.
// OnBoardGroup(g *models.UserGroup, altGroupName string) error
// // Get user information from account repository
// SearchUser(username string) (*models.User, error)
// // Search a group based on specific authentication
// SearchGroup(groupDN string) (*models.UserGroup, error)
// // Update user information after authenticate, such as OnBoard or sync info etc
// PostAuthenticate(u *models.User) error
// }

type OauthClient interface {
AuthCodeURL(state string) (string, error)
RequestToken(code string) (*models.User, error)
Expand Down
1 change: 0 additions & 1 deletion src/core/controllers/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ func (cc *CommonController) OauthCallback() {
return
}

log.Debugf("%+v", *user)
cc.SetSession("userId", user.UserID)
cc.SetSession("user", *user)
cc.Redirect("/harbor", http.StatusFound)
Expand Down

0 comments on commit f6925e0

Please sign in to comment.