dcr

package
v2.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package dcr implements the OAuth 2.0 Dynamic Client Registration plugin.

It handles POST /register (RFC 7591 §3), allowing clients to register themselves dynamically with the authorization server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Store             storm.DCRStore
	AllowPrivateIPs   bool
	SkipTLSCertVerify bool
	EndpointResolver  shared.EndpointResolver
}

Config holds the dependencies for the DCR plugin.

type Plugin

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

Plugin implements the Dynamic Client Registration endpoint.

func New

func New(cfg Config) *Plugin

New creates a new DCR plugin.

func (*Plugin) Contribute

func (p *Plugin) Contribute(ctx context.Context, cfg *protocol.DiscoveryConfiguration)

Contribute returns the discovery fields for the registration endpoint.

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns the plugin name.

func (*Plugin) Register

func (p *Plugin) Register(r chi.Router)

Register installs the /register routes.

OAuth 2.0 standard endpoint: POST /register (RFC 7591 §3) Also supports GET and PUT for reading and updating registrations.

Jump to

Keyboard shortcuts

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