types

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultScopes

func DefaultScopes() []string

DefaultScopes returns the default OAuth2 scopes based on PR #84

Types

type AuthConfig

type AuthConfig struct {
	Site         string
	RedirectPort int
	Scopes       []string
}

AuthConfig represents authentication configuration

type ClientCredentials

type ClientCredentials struct {
	ClientID     string   `json:"clientId"`
	ClientName   string   `json:"clientName"`
	RedirectURIs []string `json:"redirectUris"`
	RegisteredAt int64    `json:"registeredAt"` // Unix timestamp in seconds
	Site         string   `json:"site"`
}

ClientCredentials represents DCR client credentials JSON format matches TypeScript PR #84 for cross-compatibility Note: Public clients don't receive a client_secret

type OAuthError

type OAuthError struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
	ErrorURI         string `json:"error_uri,omitempty"`
}

OAuthError represents an OAuth error response

func (*OAuthError) String

func (e *OAuthError) String() string

type TokenSet

type TokenSet struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
	TokenType    string `json:"tokenType"`
	ExpiresIn    int64  `json:"expiresIn"`
	IssuedAt     int64  `json:"issuedAt"` // Unix timestamp in seconds
	Scope        string `json:"scope,omitempty"`
	ClientID     string `json:"clientId,omitempty"` // Client ID used for this token
}

TokenSet represents OAuth2 tokens JSON format matches TypeScript PR #84 for cross-compatibility

func (*TokenSet) IsExpired

func (t *TokenSet) IsExpired() bool

IsExpired checks if the access token is expired

Jump to

Keyboard shortcuts

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