Documentation
¶
Index ¶
- Constants
- type AuthRequiredError
- type BeginResult
- type CallbackOption
- type CallbackResult
- type ClientRecord
- type FlowError
- type Grant
- type Handler
- type Manager
- func (m *Manager) Begin(ctx context.Context, server, storageKey, endpoint, callbackID string) (BeginResult, <-chan error, error)
- func (m *Manager) CallbackOptions() []CallbackOption
- func (m *Manager) Clear(storageKey string) error
- func (m *Manager) DeliverCallback(result CallbackResult) error
- func (m *Manager) Handler(server, storageKey, endpoint string) *Handler
- func (m *Manager) RecordChallenge(storageKey, endpoint string, headers []string)
- func (m *Manager) RemoveCallback(id string)
- func (m *Manager) RemoveGrant(storageKey string) error
- func (m *Manager) SetCallback(option CallbackOption) error
- func (m *Manager) Status(storageKey, endpoint string) string
Constants ¶
View Source
const ( CallbackLocal = "local" CallbackAgentDock = "agentdock" CallbackNexus = "nexus" StatusAuthRequired = "auth_required" StatusAuthorizing = "authorizing" StatusAuthorized = "authorized" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRequiredError ¶
type AuthRequiredError struct {
Server string
}
func (*AuthRequiredError) Error ¶
func (e *AuthRequiredError) Error() string
type BeginResult ¶
type BeginResult struct {
AuthorizationURL string `json:"authorization_url,omitempty"`
CallbackID string `json:"callback_id,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
CallbackOptions []CallbackOption `json:"callback_options,omitempty"`
}
type CallbackOption ¶
type CallbackResult ¶
type ClientRecord ¶
type ClientRecord struct {
Issuer string `json:"issuer"`
RedirectURL string `json:"redirect_url"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret,omitempty"`
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty"`
ClientIDIssuedAt time.Time `json:"client_id_issued_at,omitempty"`
ClientSecretExpiresAt time.Time `json:"client_secret_expires_at,omitempty"`
LastUsedAt time.Time `json:"last_used_at,omitempty"`
}
type Grant ¶
type Grant struct {
SchemaVersion int `json:"schema_version"`
Endpoint string `json:"endpoint"`
Resource string `json:"resource"`
Issuer string `json:"issuer"`
RedirectURL string `json:"redirect_url"`
RegistrationKey string `json:"registration_key"`
TokenURL string `json:"token_url"`
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token,omitempty"`
TokenType string `json:"token_type,omitempty"`
Expiry time.Time `json:"expiry,omitempty"`
GrantedScopes []string `json:"granted_scopes,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) TokenSource ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) CallbackOptions ¶
func (m *Manager) CallbackOptions() []CallbackOption
func (*Manager) DeliverCallback ¶
func (m *Manager) DeliverCallback(result CallbackResult) error
func (*Manager) RecordChallenge ¶
func (*Manager) RemoveCallback ¶
func (*Manager) RemoveGrant ¶
func (*Manager) SetCallback ¶
func (m *Manager) SetCallback(option CallbackOption) error
Click to show internal directories.
Click to hide internal directories.