Skip to content

Commit

Permalink
[CLOUDTRUST-2987] Fix JWT token lifespan management
Browse files Browse the repository at this point in the history
  • Loading branch information
fperot74 committed Feb 8, 2021
1 parent 86c27ab commit fe0ab33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toolbox/oidc_connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func NewOidcTokenProvider(config keycloak.Config, realm, username, password, cli
}

func (o *oidcTokenProvider) ProvideToken(ctx context.Context) (string, error) {
if o.validUntil+maxProcessingDelay > time.Now().Unix() {
if time.Now().Unix()+maxProcessingDelay < o.validUntil {
return o.oidcToken.AccessToken, nil
}

Expand Down

0 comments on commit fe0ab33

Please sign in to comment.