revocation

package
v1.52.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package revocation implements the OAuth 2.0 token revocation endpoint per RFC 7009. Request handling is delegated to fosite; recording revoked JWT access tokens in the revoked_tokens denylist happens in the storage layer, which fosite drives on every revocation path.

Deviations from Doorkeeper, settled in iam#74: public clients revoke on client_id alone with ownership still enforced, and error responses keep fosite's RFC 6749 §5.2 codes rather than Doorkeeper's flat 403.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(provider Provider, store fositeStorage.Transactional, logger *logrus.Entry) *Handler

store must be the same store provider revokes through, otherwise the transaction brackets nothing. fosite brackets the refresh and auth-code grants itself but not revocation, so the bracket has to happen here.

func (*Handler) SetupRoutes

func (h *Handler) SetupRoutes(mux *http.ServeMux)

SetupRoutes registers both paths; /oauth2 is kept for compatibility.

type Provider

type Provider interface {
	NewRevocationRequest(ctx context.Context, r *http.Request) error
	WriteRevocationResponse(ctx context.Context, rw http.ResponseWriter, err error)
}

Provider is the slice of fosite.OAuth2Provider this endpoint uses.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL