Files
netmaker/cli/functions/auth.go
2022-11-28 18:16:56 +05:30

13 lines
345 B
Go

package functions
import (
"net/http"
"github.com/gravitl/netmaker/models"
)
func LoginWithUserAndPassword(username, password string) *models.SuccessResponse {
authParams := &models.UserAuthParams{UserName: username, Password: password}
return Request[models.SuccessResponse](http.MethodPost, "/api/users/adm/authenticate", authParams)
}