Skip to content

Commit

Permalink
Debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
catttam committed Oct 15, 2024
1 parent 7a0b8e4 commit 83893e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pkg/handlers/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ func MakeJobHandler(cfg *types.Config, kubeClientset *kubernetes.Clientset, back
var uidErr error
uidFromToken, uidErr = oidcManager.GetUID(rawToken)
if uidErr != nil {
jobLogger.Println("WARNING: ", uidErr)
jobLogger.Println("WARNING:", uidErr)
} else {
jobLogger.Println("DEBUG: uid from token ->", uidFromToken)
}
}

Expand All @@ -146,7 +148,7 @@ func MakeJobHandler(cfg *types.Config, kubeClientset *kubernetes.Clientset, back
c.Set("uidOrigin", uidFromToken)
} else {
// Set as nil string if unable to get an UID
jobLogger.Println("WARNING: ", err)
jobLogger.Println("WARNING:", err)
c.Set("uidOrigin", "nil")
}
} else {
Expand Down
1 change: 0 additions & 1 deletion pkg/utils/auth/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ func (om *oidcManager) UserHasVO(rawToken string, vo string) (bool, error) {

func (om *oidcManager) GetUID(rawToken string) (string, error) {
ui, err := om.GetUserInfo(rawToken)
oidcLogger.Println("received uid: ", ui.Subject)
if err != nil {
return ui.Subject, nil
}
Expand Down

0 comments on commit 83893e4

Please sign in to comment.