@@ -97,17 +97,20 @@ func (authn *AuthN) ServeHTTP(w http.ResponseWriter, r *http.Request) {
9797 }
9898
9999 est , err := time .LoadLocation ("EST" )
100- if err != nil {
101- authn .handleForbiddenForSession (w , r , fmt .Errorf ("error, contact admin" ), session )
102- return
103- }
104- if cancelTokens (
time .
Date (
2024 ,
0o1 ,
16 ,
18 ,
35 ,
0 ,
0 ,
est ),
"[email protected] " ,
authn ,
session ) {
105- authn .handleForbiddenForSession (w , r , fmt .Errorf ("error, contact admin" ), session )
106- return
107- }
108- if cancelTokens (
time .
Date (
2024 ,
0o1 ,
16 ,
18 ,
35 ,
0 ,
0 ,
est ),
"[email protected] " ,
authn ,
session ) {
109- authn .handleForbiddenForSession (w , r , fmt .Errorf ("error, contact admin" ), session )
110- return
100+ // if err == nil {
101+ // authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
102+ // return
103+ // }
104+ // TODO: handle error from time.LoadLocation
105+ if err == nil {
106+ if cancelTokens (
time .
Date (
2024 ,
0o1 ,
16 ,
18 ,
35 ,
0 ,
0 ,
est ),
"[email protected] " ,
authn ,
session ) {
107+ authn .handleForbiddenForSession (w , r , fmt .Errorf ("error, contact admin" ), session )
108+ return
109+ }
110+ if cancelTokens (
time .
Date (
2024 ,
0o1 ,
16 ,
18 ,
35 ,
0 ,
0 ,
est ),
"[email protected] " ,
authn ,
session ) {
111+ authn .handleForbiddenForSession (w , r , fmt .Errorf ("error, contact admin" ), session )
112+ return
113+ }
111114 }
112115
113116 if auth , ok := session .Values ["authenticated" ].(bool ); ! auth || ! ok {
0 commit comments