Documentation ¶
Index ¶
Constants ¶
View Source
const ( FeishuAuthURL = "/authen/v1/index" FeishuTokenURL = "/authen/v1/access_token" FeishuRefreshTokenURL = "/authen/v1/refresh_access_token" FeishuTenantTokenURL = "/auth/v3/tenant_access_token/internal" FeishuUserGroupURL = "/contact/v3/group/member_belong" )
Endpoint is feishu's endpoint url
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth interface { Handler(ctx *fasthttp.RequestCtx, session Session, redirect SoftRedirect) Valid(session Session) bool GroupValid(hostName string, session Session, valid PipeGroupValid) bool }
type BaseAuth ¶
func (*BaseAuth) IsCallback ¶
func (a *BaseAuth) IsCallback(ctx *fasthttp.RequestCtx) bool
func (*BaseAuth) RequestURL ¶
func (a *BaseAuth) RequestURL(ctx *fasthttp.RequestCtx) string
type Fake ¶
type Fake struct { }
func (*Fake) GroupValid ¶
func (f *Fake) GroupValid(hostName string, session Session, valid PipeGroupValid) bool
func (*Fake) Handler ¶
func (f *Fake) Handler(ctx *fasthttp.RequestCtx, session Session, redirect SoftRedirect)
type Feishu ¶
type Feishu struct { BaseAuth Config *config.AuthConfig }
func (*Feishu) GroupValid ¶
func (f *Feishu) GroupValid(hostName string, session Session, valid PipeGroupValid) bool
func (*Feishu) Handler ¶
func (f *Feishu) Handler(ctx *fasthttp.RequestCtx, session Session, redirect SoftRedirect)
type FeishuAccessToken ¶
type FeishuAccessToken struct { Code int `json:"code"` Msg string `json:"msg"` Data struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` Name string `json:"name"` EnName string `json:"en_name"` OpenId string `json:"open_id"` ExpiresIn int64 `json:"expires_in"` } `json:"data"` }
type FeishuTenantToken ¶
type FeishuUserGroup ¶
type OAuth2 ¶
type OAuth2 struct { BaseAuth Config *config.AuthConfig }
func (*OAuth2) GroupValid ¶
func (oauth *OAuth2) GroupValid(hostName string, session Session, valid PipeGroupValid) bool
func (*OAuth2) Handler ¶
func (oauth *OAuth2) Handler(ctx *fasthttp.RequestCtx, session Session, redirect SoftRedirect)
type PipeGroupValid ¶
type SoftRedirect ¶
type SoftRedirect func(url string)
Click to show internal directories.
Click to hide internal directories.