OAuth2 Token Revocation Store (oauth2/revocation_storage.go)

hydra · fosite/handler/oauth2/revocation_storage.go · go · Apache-2.0
auth, database, lang:go, tag:rfc7009, tag:token-revocation

Storage contract for RFC 7009 token revocation. Implement it to revoke a refresh token and the access tokens issued from the same authorization grant.

// Source: https://github.com/ory/hydra | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright © 2025 Ory Corp
// SPDX-License-Identifier: Apache-2.0

package oauth2

import (
	"context"
)

// TokenRevocationStorage provides the storage implementation
// as specified in: https://tools.ietf.org/html/rfc7009
type TokenRevocationStorage interface {
	// RevokeRefreshToken revokes a refresh token as specified in:
	// https://tools.ietf.org/html/rfc7009#section-2.1
	// If the particular
	// token is a refresh token and the authorization server supports the
	// revocation of access tokens, then the authorization server SHOULD
	// also invalidate all access tokens based on the same 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key