mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 01:07:41 +08:00
Added swagger for API docs.
This commit is contained in:
10
auth/auth.go
10
auth/auth.go
@@ -82,6 +82,7 @@ func InitializeAuthProvider() string {
|
||||
return authInfo[0]
|
||||
}
|
||||
|
||||
// Not included in API reference as part of the OAuth process itself.
|
||||
// HandleAuthCallback - handles oauth callback
|
||||
func HandleAuthCallback(w http.ResponseWriter, r *http.Request) {
|
||||
if auth_provider == nil {
|
||||
@@ -96,7 +97,14 @@ func HandleAuthCallback(w http.ResponseWriter, r *http.Request) {
|
||||
functions[handle_callback].(func(http.ResponseWriter, *http.Request))(w, r)
|
||||
}
|
||||
|
||||
// HandleAuthLogin - handles oauth login
|
||||
// swagger:route GET /api/oauth/login nodes HandleAuthLogin
|
||||
//
|
||||
// Handles OAuth login
|
||||
//
|
||||
// Schemes: https
|
||||
//
|
||||
// Security:
|
||||
// oauth
|
||||
func HandleAuthLogin(w http.ResponseWriter, r *http.Request) {
|
||||
if auth_provider == nil {
|
||||
var referer = r.Header.Get("referer")
|
||||
|
Reference in New Issue
Block a user