From 7f9b68ebb0309adb3b0a839085e48b87ea1e515f Mon Sep 17 00:00:00 2001 From: ale8k Date: Thu, 7 Mar 2024 13:04:03 +0000 Subject: [PATCH] bad comments --- internal/auth/oauth2.go | 2 +- internal/jimmhttp/auth_handler.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/auth/oauth2.go b/internal/auth/oauth2.go index afc397a60..9a655689a 100644 --- a/internal/auth/oauth2.go +++ b/internal/auth/oauth2.go @@ -219,7 +219,7 @@ func (as *AuthenticationService) Email(idToken *oidc.IDToken) (string, error) { // via an access token. The token only contains the user's email for authentication. func (as *AuthenticationService) MintSessionToken(email string, secretKey string) (string, error) { const op = errors.Op("auth.AuthenticationService.MintAccessToken") - + token, err := jwt.NewBuilder(). Subject(email). Expiration(time.Now().Add(as.sessionTokenExpiry)). diff --git a/internal/jimmhttp/auth_handler.go b/internal/jimmhttp/auth_handler.go index bd8225c5a..ac33cc379 100644 --- a/internal/jimmhttp/auth_handler.go +++ b/internal/jimmhttp/auth_handler.go @@ -137,7 +137,7 @@ func (oah *OAuthHandler) Callback(w http.ResponseWriter, r *http.Request) { } session.IsNew = true // Sets cookie to a fresh new cookie - session.Options.MaxAge = oah.cookieExpiry // 24 Hours expiry + session.Options.MaxAge = oah.cookieExpiry // Expiry in seconds session.Options.Secure = oah.secureCookies // Ensures only sent with HTTPS session.Options.HttpOnly = false // Allow Javascript to read it