Documentation
¶
Index ¶
- Constants
- func BadRequestHandler(rw http.ResponseWriter, r *http.Request)
- func DeleteTGC(sess *sessions.Session)
- func GetClientIP(req *http.Request) (ip string)
- func GetTGC(sess *sessions.Session) *cas.Ticket
- func InGroup(gn, uid string) bool
- func IsKeeper(uid string) bool
- func New() *webImpl
- func NewServerConfig() *osin.ServerConfig
- func NewTGC(sess *sessions.Session, ticket *cas.Ticket)
- func NotFoundHandler(rw http.ResponseWriter, r *http.Request)
- func T(name string) *template.Template
- type AccessTokenGenJWT
- type Context
- type User
Constants ¶
View Source
const ( LimitArticle = 3 LimitLinks = 10 )
Variables ¶
This section is empty.
Functions ¶
func BadRequestHandler ¶
func BadRequestHandler(rw http.ResponseWriter, r *http.Request)
func GetClientIP ¶
func NewServerConfig ¶
func NewServerConfig() *osin.ServerConfig
func NotFoundHandler ¶
func NotFoundHandler(rw http.ResponseWriter, r *http.Request)
Types ¶
type AccessTokenGenJWT ¶
type AccessTokenGenJWT struct {
Key []byte
}
JWT access token generator
func (*AccessTokenGenJWT) GenerateAccessToken ¶
func (c *AccessTokenGenJWT) GenerateAccessToken(data *osin.AccessData, generaterefresh bool) (accesstoken string, refreshtoken string, err error)
type Context ¶
type Context struct { Request *http.Request Writer http.ResponseWriter Vars map[string]string Session *sessions.Session ResUrl string User *User LastUid string Referer string Version string }
func NewContext ¶
func (*Context) IsUserExpired ¶
type User ¶
func UserFromStaff ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.