Documentation ¶
Index ¶
- func CallbackHandler() gin.HandlerFunc
- func GitHub(c *gin.Context)
- func GitHubCallback(c *gin.Context)
- func Google(c *gin.Context)
- func GoogleCallback(c *gin.Context)
- func Index(c *gin.Context)
- func InitController(a *auth.Auther)
- func OAuthHandler() gin.HandlerFunc
- func RegisterHandler() gin.HandlerFunc
- func Twitter(c *gin.Context)
- func TwitterCallback(c *gin.Context)
- type CallbackFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallbackHandler ¶
func CallbackHandler() gin.HandlerFunc
CallbackHandler parse state and code in order to sign in
func GitHubCallback ¶
GitHubCallback registers user info @Description try register github info @Summary try register github info @Param state query string true "state" @Param code query string true "code" @Failure 503 {string} string "no OAuth token"
func GoogleCallback ¶
GoogleCallback registers user info @Param state query string true "state" @Param code query string true "code" @Failure 503 {string} string "no OAuth token"
func OAuthHandler ¶
func OAuthHandler() gin.HandlerFunc
OAuthHandler handles redirect or error page It views error page when keyErr is set It redirects OAuth sites when keyRedirect is set
func RegisterHandler ¶
func RegisterHandler() gin.HandlerFunc
RegisterHandler sends back jwt token to client It should be called after CallbackHandler is called
func TwitterCallback ¶
TwitterCallback registers user info @Param oauth_verifier query string true "access token" @Failure 503 {string} string "session expire" @Failure 503 {string} string "no OAuth token"