oauth

package
v0.0.0-...-c20d9b3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCustomOAuth

func NewCustomOAuth(config domain.OAuthConfig) domain.OAuther

func NewOAuther

func NewOAuther(config domain.OAuthConfig) (domain.OAuther, error)

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
	UnionID      string `json:"unionid"`
}

type CustomOAuth

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

func (*CustomOAuth) GetAuthorizeURL

func (c *CustomOAuth) GetAuthorizeURL() (string, string)

GetAuthorizeURL implements domain.OAuther.

func (*CustomOAuth) GetUserInfo

func (c *CustomOAuth) GetUserInfo(code string) (*domain.OAuthUserInfo, error)

GetUserInfo implements domain.OAuther.

type DingTalk

type DingTalk struct {
	ClientID     string
	ClientSecret string
	RedirectURI  string
	// contains filtered or unexported fields
}

func NewDingTalk

func NewDingTalk(config domain.OAuthConfig) *DingTalk

func (*DingTalk) GetAuthorizeURL

func (d *DingTalk) GetAuthorizeURL() (string, string)

func (*DingTalk) GetUserInfo

func (d *DingTalk) GetUserInfo(code string) (*domain.OAuthUserInfo, error)

GetUserInfo implements domain.OAuther.

type UserInfo

type UserInfo map[string]any

Jump to

Keyboard shortcuts

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