Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleOauth ¶
func HandleOauth( userz core.UserService, sessions core.Session, notifier core.Notifier, ) http.HandlerFunc
LoginByCode godoc @Summary login with mixin oauth code @Description @Tags user @Accept json @Produce json @Param request body LoginRequest false "request login" @Success 200 {object} LoginResponse @Router /login [post]
Types ¶
type LoginRequest ¶
type LoginRequest struct { // mixin oauth code Code string `json:"code,omitempty" valid:"required"` }
type LoginResponse ¶
type LoginResponse struct { // user mixin id ID string `json:"id,omitempty" format:"uuid"` // user name Name string `json:"name,omitempty"` // user avatar Avatar string `json:"avatar,omitempty"` // mixin oauth token Token string `json:"token,omitempty"` // mixin oauth scope Scope string `json:"scope,omitempty"` }
Click to show internal directories.
Click to hide internal directories.