Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserLogin ¶ added in v0.8.0
GetUserLogin gets the user login 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 (*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
func (*Auth) Login ¶
func (a *Auth) Login(w http.ResponseWriter, r *http.Request)
Login handler redirects user to oauth provider
type GitHub ¶ added in v0.8.0
type GitHub struct { AppID int PrivateKey string OrganizationOp store.OrganizationOperator }
GitHub is an HTTP service to call GitHub endpoints
func (*GitHub) Org ¶ added in v0.8.0
func (g *GitHub) Org(w http.ResponseWriter, r *http.Request)
Org writes in the response the individual organization requested by the URL parameter "orgName", only if the user is an admin
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer(auth *Auth, gh *GitHub, static *Static) *HTTPServer
func (*HTTPServer) ServeHTTP ¶
func (s *HTTPServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.