dropbox

package
v0.92.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package dropbox implements the Dropbox provider.

Index

Constants

View Source
const (
	ID              = "dropbox"
	ClientIdKey     = "key"
	ClientSecretKey = "secret"
)

Variables

This section is empty.

Functions

func Register added in v0.92.0

func Register()

Register registers the Dropbox OAuth provider in the global provider registry.

Types

type Dropbox

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

func GetClient added in v0.92.0

func GetClient() *Dropbox

GetClient reads OAuth provider config and returns a new Dropbox client suitable for OAuth authorization flows.

func NewDropbox

func NewDropbox(clientId, clientSecret, redirectURI, accessToken string) *Dropbox

func (*Dropbox) GetAccessToken

func (v *Dropbox) GetAccessToken(ctx fiber.Ctx) (*providers.OAuthToken, error)

func (*Dropbox) GetAuthorizeURL

func (v *Dropbox) GetAuthorizeURL(state string) string

func (*Dropbox) RefreshAccessToken added in v0.92.0

func (v *Dropbox) RefreshAccessToken(ctx context.Context, refreshToken string) (*providers.OAuthToken, error)

RefreshAccessToken implements OAuthRefresher for Dropbox. Dropbox supports token refresh via the refresh_token grant.

func (*Dropbox) Upload

func (v *Dropbox) Upload(path string, content io.Reader) error

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
	UID          string `json:"uid"`
	AccountID    string `json:"account_id"`
}

Jump to

Keyboard shortcuts

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