Skip to content

Commit

Permalink
remove error (#4479)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen authored Apr 1, 2024
1 parent bb6c0a1 commit dc5c925
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions api/server/authn/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,20 @@ func (authn *AuthN) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}

est, err := time.LoadLocation("EST")
if err != nil {
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
return
}
if cancelTokens(time.Date(2024, 0o1, 16, 18, 35, 0, 0, est), "[email protected]", authn, session) {
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
return
}
if cancelTokens(time.Date(2024, 0o1, 16, 18, 35, 0, 0, est), "[email protected]", authn, session) {
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
return
// if err == nil {
// authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
// return
// }
// TODO: handle error from time.LoadLocation
if err == nil {
if cancelTokens(time.Date(2024, 0o1, 16, 18, 35, 0, 0, est), "[email protected]", authn, session) {
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
return
}
if cancelTokens(time.Date(2024, 0o1, 16, 18, 35, 0, 0, est), "[email protected]", authn, session) {
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
return
}
}

if auth, ok := session.Values["authenticated"].(bool); !auth || !ok {
Expand Down

0 comments on commit dc5c925

Please sign in to comment.