clientcredentials

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package clientcredentials provides SPIFFE-bound client credentials handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory() server.Factory

Factory creates the SPIFFE-aware wrapper around Fosite's stock client credentials handler. It must only be installed for configured associations that permit client_credentials.

Types

type Handler

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

Handler restricts Fosite's client credentials handler to authenticated SPIFFE clients and association policy. It delegates token lifetime and issuance to exactly one stock Fosite ClientCredentialsGrantHandler.

func (*Handler) CanHandleTokenEndpointRequest

func (*Handler) CanHandleTokenEndpointRequest(_ context.Context, requester fosite.AccessRequester) bool

CanHandleTokenEndpointRequest handles only the exact client_credentials grant.

func (*Handler) CanSkipClientAuth

func (*Handler) CanSkipClientAuth(_ context.Context, _ fosite.AccessRequester) bool

CanSkipClientAuth requires authenticated SPIFFE client provenance.

func (*Handler) HandleTokenEndpointRequest

func (h *Handler) HandleTokenEndpointRequest(ctx context.Context, requester fosite.AccessRequester) error

HandleTokenEndpointRequest validates SPIFFE association policy, establishes the SPIFFE subject session, and delegates standard client-credentials work to Fosite.

func (*Handler) PopulateTokenEndpointResponse

func (h *Handler) PopulateTokenEndpointResponse(
	ctx context.Context, requester fosite.AccessRequester, responder fosite.AccessResponder,
) error

PopulateTokenEndpointResponse delegates access-token issuance to the stock Fosite handler after HandleTokenEndpointRequest has established the session.

Jump to

Keyboard shortcuts

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