lark

package
v1.82.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lark

type Lark interface {
	GetAppAccessToken() error // get app access token
}

Lark is the implementation of `goth.Provider` for accessing Lark

type Provider

type Provider struct {
	ClientKey   string
	Secret      string
	CallbackURL string
	HTTPClient  *http.Client
	// contains filtered or unexported fields
}

Provider is the implementation of `goth.Provider` for accessing Lark

func New

func New(clientKey, secret, callbackURL string, scopes ...string) *Provider

New creates a new Lark provider and sets up important connection details.

func (*Provider) BeginAuth

func (p *Provider) BeginAuth(state string) (goth.Session, error)

func (*Provider) Client

func (p *Provider) Client() *http.Client

func (*Provider) Debug

func (p *Provider) Debug(b bool)

func (*Provider) FetchUser

func (p *Provider) FetchUser(session goth.Session) (goth.User, error)

FetchUser will go to Lark and access basic information about the user.

func (*Provider) GetAppAccessToken

func (p *Provider) GetAppAccessToken() error

GetAppAccessToken get lark app access token

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) RefreshToken

func (p *Provider) RefreshToken(refreshToken string) (*oauth2.Token, error)

func (*Provider) RefreshTokenAvailable

func (p *Provider) RefreshTokenAvailable() bool

func (*Provider) SetName

func (p *Provider) SetName(name string)

func (*Provider) UnmarshalSession

func (p *Provider) UnmarshalSession(data string) (goth.Session, error)

type Session

type Session struct {
	AuthURL               string
	AccessToken           string
	RefreshToken          string
	ExpiresAt             time.Time
	RefreshTokenExpiresAt time.Time
}

func (*Session) Authorize

func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, error)

func (*Session) GetAuthURL

func (s *Session) GetAuthURL() (string, error)

func (*Session) Marshal

func (s *Session) Marshal() string

Jump to

Keyboard shortcuts

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