auth

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GiteeUser

type GiteeUser struct {
	AvatarUrl         string `json:"avatar_url"`
	Bio               string `json:"bio"`
	Blog              string `json:"blog"`
	CreatedAt         string `json:"created_at"`
	Email             string `json:"email"`
	EventsUrl         string `json:"events_url"`
	Followers         uint32 `json:"followers"`
	FollowersUrl      string `json:"followers_url"`
	Following         uint32 `json:"following"`
	FollowingUrl      string `json:"following_url"`
	GistsUrl          string `json:"gists_url"`
	HtmlUrl           string `json:"html_url"`
	Id                uint32 `json:"id"`
	Login             string `json:"login"`
	Name              string `json:"name"`
	OrganizationsUrl  string `json:"organizations_url"`
	PublicGists       uint32 `json:"public_gists"`
	PublicRepos       uint32 `json:"public_repos"`
	ReceivedEventsUrl string `json:"received_events_url"`
	Remark            string `json:"remark"`
	ReposUrl          string `json:"repos_url"`
	Stared            uint32 `json:"stared"`
	StarredUrl        string `json:"starred_url"`
	SubscriptionsUrl  string `json:"subscriptions_url"`
	Type              string `json:"type"`
	UpdatedAt         string `json:"updated_at"`
	Url               string `json:"url"`
	Watched           uint32 `json:"watched"`
	Weibo             string `json:"weibo"`
}

func (*GiteeUser) GetAPP

func (g *GiteeUser) GetAPP() vobj.OAuthAPP

func (*GiteeUser) GetAvatar

func (g *GiteeUser) GetAvatar() string

func (*GiteeUser) GetEmail

func (g *GiteeUser) GetEmail() string

func (*GiteeUser) GetNickname

func (g *GiteeUser) GetNickname() string

func (*GiteeUser) GetOAuthID

func (g *GiteeUser) GetOAuthID() uint32

func (*GiteeUser) GetRemark

func (g *GiteeUser) GetRemark() string

func (*GiteeUser) GetUsername

func (g *GiteeUser) GetUsername() string

func (*GiteeUser) String

func (g *GiteeUser) String() string

String implements fmt.Stringer interface

type GithubUser

type GithubUser struct {
	AvatarUrl         string `json:"avatar_url"`
	Bio               string `json:"bio"`
	Blog              string `json:"blog"`
	Company           string `json:"company"`
	CreatedAt         string `json:"created_at"`
	Email             string `json:"email"`
	EventsUrl         string `json:"events_url"`
	Followers         uint32 `json:"followers"`
	FollowersUrl      string `json:"followers_url"`
	Following         uint32 `json:"following"`
	FollowingUrl      string `json:"following_url"`
	GistsUrl          string `json:"gists_url"`
	GravatarId        string `json:"gravatar_id"`
	Hireable          any    `json:"hireable"`
	HtmlUrl           string `json:"html_url"`
	Id                uint32 `json:"id"`
	Location          string `json:"location"`
	Login             string `json:"login"`
	Name              string `json:"name"`
	NodeId            string `json:"node_id"`
	NotificationEmail any    `json:"notification_email"`
	OrganizationsUrl  string `json:"organizations_url"`
	PublicGists       uint32 `json:"public_gists"`
	PublicRepos       uint32 `json:"public_repos"`
	ReceivedEventsUrl string `json:"received_events_url"`
	ReposUrl          string `json:"repos_url"`
	SiteAdmin         bool   `json:"site_admin"`
	StarredUrl        string `json:"starred_url"`
	SubscriptionsUrl  string `json:"subscriptions_url"`
	TwitterUsername   any    `json:"twitter_username"`
	Type              string `json:"type"`
	UpdatedAt         string `json:"updated_at"`
	Url               string `json:"url"`
}

func (*GithubUser) GetAPP

func (g *GithubUser) GetAPP() vobj.OAuthAPP

func (*GithubUser) GetAvatar

func (g *GithubUser) GetAvatar() string

func (*GithubUser) GetEmail

func (g *GithubUser) GetEmail() string

func (*GithubUser) GetNickname

func (g *GithubUser) GetNickname() string

func (*GithubUser) GetOAuthID

func (g *GithubUser) GetOAuthID() uint32

func (*GithubUser) GetRemark

func (g *GithubUser) GetRemark() string

func (*GithubUser) GetUsername

func (g *GithubUser) GetUsername() string

func (*GithubUser) String

func (g *GithubUser) String() string

String implement fmt.Stringer

type IOAuthUser

type IOAuthUser interface {
	fmt.Stringer
	GetOAuthID() uint32
	GetEmail() string
	GetRemark() string
	GetUsername() string
	GetNickname() string
	GetAvatar() string
	GetAPP() vobj.OAuthAPP
}

func NewOAuthRowData

func NewOAuthRowData(app vobj.OAuthAPP, row string) (IOAuthUser, error)

type OauthLoginParams

type OauthLoginParams struct {
	Code    string `json:"code"`
	Email   string `json:"email"`
	OAuthID uint32 `json:"oAuthID"`
	Token   string `json:"token"`
}

func (*OauthLoginParams) GetTokenKey added in v1.1.0

func (o *OauthLoginParams) GetTokenKey() string

GetTokenKey 返回token的key

func (*OauthLoginParams) VerifyToken added in v1.1.0

func (o *OauthLoginParams) VerifyToken(ctx context.Context, cacher cache.ISimpleCacher) error

VerifyToken 校验token是否过期

func (*OauthLoginParams) WaitVerifyToken added in v1.1.0

func (o *OauthLoginParams) WaitVerifyToken(ctx context.Context, cacher cache.ISimpleCacher) error

WaitVerifyToken 等待token验证

Jump to

Keyboard shortcuts

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