Skip to content

Commit

Permalink
docs(example): check access token expiration (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
mqf20 authored Feb 13, 2025
1 parent 37dd41e commit c03a8c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions example/server/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ func (s *Storage) SetUserinfoFromToken(ctx context.Context, userinfo *oidc.UserI
// return err
// }
//}
if token.Expiration.Before(time.Now()) {
return fmt.Errorf("token is expired")
}
return s.setUserinfo(ctx, userinfo, token.Subject, token.ApplicationID, token.Scopes)
}

Expand Down

0 comments on commit c03a8c5

Please sign in to comment.