Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bobgroup-go-utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bob Public Utils
bobgroup-go-utils
Merge requests
!63
Resolve "Allow expiry date for JWT tokens to be the zero date"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "Allow expiry date for JWT tokens to be the zero date"
46-allow-expiry-date-for-jwt-tokens-to-be-the-zero-date
into
main
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
James Page
requested to merge
46-allow-expiry-date-for-jwt-tokens-to-be-the-zero-date
into
main
2 months ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Related to
#46
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
c7f564d5
1 commit,
2 months ago
1 file
+
1
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
auth/jwt.go
+
1
−
1
View file @ c7f564d5
Edit in single-file editor
Open in Web IDE
Show full file
@@ -100,7 +100,7 @@ func ValidateJWT(jsonWebTokenString string, secretKey string) (JsonWebToken, err
}
// Validate the expiry date
if
jsonWebToken
.
ExpiryDate
.
Before
(
date_utils
.
CurrentDate
())
{
if
!
jsonWebToken
.
ExpiryDate
.
IsZero
()
&&
jsonWebToken
.
ExpiryDate
.
Before
(
date_utils
.
CurrentDate
())
{
return
jsonWebToken
,
errors
.
Error
(
"token has expired"
)
}
Loading