Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserID ¶
GetUserID gets the user ID set by the JWT middleware in the Context
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth is http service to authorize users, it uses oAuth and JWT underneath
func NewAuth ¶
NewAuth create new Auth service
func (*Auth) Callback ¶
func (a *Auth) Callback(w http.ResponseWriter, r *http.Request)
Callback makes exchange with oauth provider and redirects to index page with JWT token
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer(auth *Auth, static *Static) *HTTPServer
func (*HTTPServer) ServeHTTP ¶
func (s *HTTPServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files
¶
- auth.go
- http_server.go
- static_files_dev.go
Click to show internal directories.
Click to hide internal directories.