auth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizeURL = "https://www.dropbox.com/oauth2/authorize"
	TokenURL     = "https://api.dropboxapi.com/oauth2/token" // #nosec G101 - This is a URL, not a credential
)

Variables

This section is empty.

Functions

func ValidateToken

func ValidateToken(accessToken string) error

Types

type AuthResult

type AuthResult struct {
	AccessToken  string
	RefreshToken string
	ExpiresAt    time.Time
}

func RefreshToken

func RefreshToken(config OAuthConfig, refreshToken string) (*AuthResult, error)

func StartOAuthFlow

func StartOAuthFlow(config OAuthConfig) (*AuthResult, error)

type OAuthConfig

type OAuthConfig struct {
	ClientID     string
	ClientSecret string
	RedirectURI  string
}

Jump to

Keyboard shortcuts

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