clientcredentials

package
v0.68.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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