dcr

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	AuthorizationEndpoint string    `json:"authorizationEndpoint,omitempty"`
	AuthorizationServer   string    `json:"authorizationServer,omitempty"`
	ClientID              string    `json:"clientId,omitempty"`
	ClientName            string    `json:"clientName,omitempty"`
	ProviderName          string    `json:"providerName"`
	RegisteredAt          time.Time `json:"registeredAt"`
	RequiredScopes        []string  `json:"requiredScopes,omitempty"`
	ResourceURL           string    `json:"resourceUrl,omitempty"`
	ScopesSupported       []string  `json:"scopesSupported,omitempty"`
	ServerName            string    `json:"serverName"`
	TokenEndpoint         string    `json:"tokenEndpoint,omitempty"`
}

Client represents a dynamically registered OAuth client Simplified from Pinata - removed State field (not needed for CE mode)

type Credentials

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

Credentials provides storage for DCR client metadata via credential helper

func NewCredentials

func NewCredentials(credentialHelper credentials.Helper) *Credentials

NewCredentials creates a new DCR credentials store

func (*Credentials) DeleteClient

func (c *Credentials) DeleteClient(serverName string) error

DeleteClient removes a DCR client from the credential helper

func (*Credentials) ListClients

func (c *Credentials) ListClients() (map[string]Client, error)

ListClients returns all stored DCR clients

func (*Credentials) RetrieveClient

func (c *Credentials) RetrieveClient(serverName string) (Client, error)

RetrieveClient retrieves a DCR client from the credential helper

func (*Credentials) SaveClient

func (c *Credentials) SaveClient(serverName string, client Client) error

SaveClient stores a DCR client in the credential helper

type Manager

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

Manager orchestrates Dynamic Client Registration flows

func NewManager

func NewManager(credentialHelper credentials.Helper, redirectURI string) *Manager

NewManager creates a new DCR manager with the specified redirect URI

func (*Manager) Credentials

func (m *Manager) Credentials() *Credentials

Credentials returns the credentials store

func (*Manager) DeleteDCRClient

func (m *Manager) DeleteDCRClient(serverName string) error

DeleteDCRClient removes a DCR client from storage

func (*Manager) GetDCRClient

func (m *Manager) GetDCRClient(serverName string) (Client, error)

GetDCRClient retrieves a DCR client from storage

func (*Manager) ListDCRClients

func (m *Manager) ListDCRClients() (map[string]Client, error)

ListDCRClients returns all stored DCR clients

func (*Manager) PerformDiscoveryAndRegistration

func (m *Manager) PerformDiscoveryAndRegistration(ctx context.Context, serverName string, scopes string) error

PerformDiscoveryAndRegistration executes OAuth discovery and DCR for a server This is called when no DCR client exists or when it needs re-registration

Jump to

Keyboard shortcuts

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