auth.go 345 B

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