oauth

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmail

func NewEmail(req *entity.OAuthChannel) repository.OAuthor

func NewWXOfficialAccount

func NewWXOfficialAccount(req *entity.OAuthChannel) repository.OAuthor

func NewYiBan

func NewYiBan(req *entity.OAuthChannel) repository.OAuthor

Types

type Email

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

func (*Email) GetOAuthInfo

func (e *Email) GetOAuthInfo(_ core.Context, req *types.GetOAuthInfoRequest) (*types.GetOAuthInfoReply, error)

func (*Email) GetOAuthToken

func (e *Email) GetOAuthToken(ctx core.Context, req *types.GetOAuthTokenRequest) (*types.GetOAuthTokenReply, error)

func (*Email) OAuthHandler

func (e *Email) OAuthHandler(ctx core.Context, req *types.OAuthHandlerRequest) (*types.OAuthHandlerReply, error)

OAuthHandler 前置处理

func (*Email) Send

func (e *Email) Send(ctx core.Context, email string, req *captcha.GetCaptchaResponse) error

type OAuth

type OAuth struct{}

func New

func New() *OAuth

func (OAuth) CreateOAuth

func (oa OAuth) CreateOAuth(ctx core.Context, oauth *entity.OAuth) (uint32, error)

func (OAuth) CreateOAuthChannel

func (r OAuth) CreateOAuthChannel(ctx core.Context, channel *entity.OAuthChannel) (uint32, error)

CreateOAuthChannel 创建数据

func (OAuth) DeleteOAuth

func (oa OAuth) DeleteOAuth(ctx core.Context, userId uint32, channelId uint32) error

func (OAuth) DeleteOAuthChannel

func (r OAuth) DeleteOAuthChannel(ctx core.Context, id uint32) error

DeleteOAuthChannel 删除数据

func (OAuth) GetOAuthByCO

func (oa OAuth) GetOAuthByCO(ctx core.Context, cid uint32, oid string) (*entity.OAuth, error)

GetOAuthByCO 通过channel_id 和 oid获取 授权信息

func (OAuth) GetOAuthChannel

func (r OAuth) GetOAuthChannel(ctx core.Context, id uint32) (*entity.OAuthChannel, error)

GetOAuthChannel 获取指定的数据

func (OAuth) GetOAuthChannelByKeyword

func (r OAuth) GetOAuthChannelByKeyword(ctx core.Context, keyword string) (*entity.OAuthChannel, error)

GetOAuthChannelByKeyword 获取指定数据

func (OAuth) GetOAuthor

func (oa OAuth) GetOAuthor(req *entity.OAuthChannel) (repository.OAuthor, error)

GetOAuthor 获取指定的授权器

func (OAuth) GetTokenByUUID

func (oa OAuth) GetTokenByUUID(ctx core.Context, s string) (*types.GetOAuthTokenReply, error)

GetTokenByUUID 通过uuid获取token

func (OAuth) IsBindOAuth

func (oa OAuth) IsBindOAuth(ctx core.Context, cid uint32, oid string) bool

func (OAuth) ListOAuth

func (oa OAuth) ListOAuth(ctx core.Context, req *types.ListOAuthRequest) ([]*entity.OAuth, uint32, error)

func (OAuth) ListOAuthChannel

func (r OAuth) ListOAuthChannel(ctx core.Context, req *types.ListOAuthChannelRequest) ([]*entity.OAuthChannel, uint32, error)

ListOAuthChannel 获取列表

func (OAuth) ListOAuthor

func (oa OAuth) ListOAuthor() []types.OAuthor

ListOAuthor 获取实现的授权器名称

func (OAuth) SetTokenByUUID

func (oa OAuth) SetTokenByUUID(ctx core.Context, s string, reply *types.GetOAuthTokenReply) error

SetTokenByUUID 通过uuid设置token

func (OAuth) UpdateOAuth

func (oa OAuth) UpdateOAuth(ctx core.Context, oauth *entity.OAuth) error

func (OAuth) UpdateOAuthChannel

func (r OAuth) UpdateOAuthChannel(ctx core.Context, channel *entity.OAuthChannel) error

UpdateOAuthChannel 更新数据

type OAuthorInitFunc

type OAuthorInitFunc func(req *entity.OAuthChannel) repository.OAuthor

type WXOfficialAccount

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

func (WXOfficialAccount) GetOAuthInfo

func (WXOfficialAccount) GetOAuthToken

func (WXOfficialAccount) OAuthHandler

type YiBan

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

func (YiBan) GetOAuthInfo

func (y YiBan) GetOAuthInfo(ctx core.Context, req *types.GetOAuthInfoRequest) (*types.GetOAuthInfoReply, error)

func (YiBan) GetOAuthToken

func (YiBan) OAuthHandler

OAuthHandler 获取鉴权方式

Jump to

Keyboard shortcuts

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