Documentation
¶
Index ¶
- type Client
- type Credentials
- type Manager
- func (m *Manager) Credentials() *Credentials
- func (m *Manager) DeleteDCRClient(serverName string) error
- func (m *Manager) GetDCRClient(serverName string) (Client, error)
- func (m *Manager) ListDCRClients() (map[string]Client, error)
- func (m *Manager) PerformDiscoveryAndRegistration(ctx context.Context, serverName string, scopes string) error
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 ¶
DeleteDCRClient removes a DCR client from storage
func (*Manager) GetDCRClient ¶
GetDCRClient retrieves a DCR client from storage
func (*Manager) ListDCRClients ¶
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