41 lines
908 B
Go
41 lines
908 B
Go
package http
|
|
|
|
import "net/http"
|
|
|
|
type AuthHandler interface {
|
|
SendCode(w http.ResponseWriter, r *http.Request)
|
|
Login(w http.ResponseWriter, r *http.Request)
|
|
Logout(w http.ResponseWriter, r *http.Request)
|
|
VerifySession(w http.ResponseWriter, r *http.Request)
|
|
}
|
|
|
|
type SendCodeResponse struct {
|
|
}
|
|
|
|
type Session struct {
|
|
HumanId string `json:"id"`
|
|
TokenId string `json:"token_id"`
|
|
}
|
|
|
|
type authHandlerImpl struct{}
|
|
|
|
func (a authHandlerImpl) SendCode(w http.ResponseWriter, r *http.Request) {
|
|
//TODO implement me
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a authHandlerImpl) Login(w http.ResponseWriter, r *http.Request) {
|
|
//TODO implement me
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a authHandlerImpl) Logout(w http.ResponseWriter, r *http.Request) {
|
|
//TODO implement me
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a authHandlerImpl) VerifySession(w http.ResponseWriter, r *http.Request) {
|
|
//TODO implement me
|
|
panic("implement me")
|
|
}
|