oauth

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetadataHandler

func NewMetadataHandler(config MetadataHandlerConfig) http.HandlerFunc

NewMetadataHandler creates an HTTP handler that serves OAuth 2.0 protected resource metadata

Types

type MetadataHandlerConfig

type MetadataHandlerConfig struct {
	ResourceName         string
	ResourceURL          string
	AuthorizationServers []string
	Logger               *slog.Logger
}

MetadataHandlerConfig holds configuration for the OAuth metadata handler

type ProtectedResourceMetadata

type ProtectedResourceMetadata struct {
	ResourceName           string   `json:"resource_name"`
	Resource               string   `json:"resource"`
	AuthorizationServers   []string `json:"authorization_servers"`
	BearerMethodsSupported []string `json:"bearer_methods_supported"`
	ScopesSupported        []string `json:"scopes_supported"`
}

ProtectedResourceMetadata represents OAuth 2.0 protected resource metadata as defined in RFC 8693 and related OAuth standards

Jump to

Keyboard shortcuts

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