Skip to content

Instantly share code, notes, and snippets.

@sumanthkumarc
Created August 3, 2022 17:49
Show Gist options
  • Save sumanthkumarc/94fb5503c4447daa0023f73d5e365b9f to your computer and use it in GitHub Desktop.
Save sumanthkumarc/94fb5503c4447daa0023f73d5e365b9f to your computer and use it in GitHub Desktop.
# Copied from https://github.com/kumahq/kuma/blob/master/pkg/core/tokens/validator.go#L65
revoked, err := j.revocations.IsRevoked(ctx, claims.ID())
if err != nil {
return errors.Wrap(err, "could not check if the token is revoked")
}
if revoked {
return errors.New("token is revoked")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment