update project name
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-ldap/ldap/v3"
|
"github.com/go-ldap/ldap/v3"
|
||||||
|
|
||||||
common "user-manager-api/app/common"
|
common "access-manager-api/app/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LDAPClient wrapper struct containing the connection, baseDN, peopleDN, and groupsDN
|
// LDAPClient wrapper struct containing the connection, baseDN, peopleDN, and groupsDN
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/go-ldap/ldap/v3"
|
"github.com/go-ldap/ldap/v3"
|
||||||
|
|
||||||
common "user-manager-api/app/common"
|
common "access-manager-api/app/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LDAPEntryToUser(entry *ldap.Entry) common.User {
|
func LDAPEntryToUser(entry *ldap.Entry) common.User {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package localdb
|
package localdb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
common "access-manager-api/app/common"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
common "user-manager-api/app/common"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type DB struct {
|
type DB struct {
|
||||||
|
|||||||
+5
-5
@@ -9,11 +9,11 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
common "access-manager-api/app/common"
|
||||||
|
ldap "access-manager-api/app/ldap"
|
||||||
|
localdb "access-manager-api/app/localdb"
|
||||||
|
pve "access-manager-api/app/pve"
|
||||||
paas "proxmoxaas-common-lib"
|
paas "proxmoxaas-common-lib"
|
||||||
common "user-manager-api/app/common"
|
|
||||||
ldap "user-manager-api/app/ldap"
|
|
||||||
localdb "user-manager-api/app/localdb"
|
|
||||||
pve "user-manager-api/app/pve"
|
|
||||||
|
|
||||||
"github.com/gin-contrib/sessions"
|
"github.com/gin-contrib/sessions"
|
||||||
"github.com/gin-contrib/sessions/cookie"
|
"github.com/gin-contrib/sessions/cookie"
|
||||||
@@ -510,7 +510,7 @@ func Run(configPath *string, localDBPath *string) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
log.Printf("Starting User Manager API on port %s\n", strconv.Itoa(Config.ListenPort))
|
log.Printf("Starting Access Manager API on port %s\n", strconv.Itoa(Config.ListenPort))
|
||||||
|
|
||||||
err = router.Run("0.0.0.0:" + strconv.Itoa(Config.ListenPort))
|
err = router.Run("0.0.0.0:" + strconv.Itoa(Config.ListenPort))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
common "access-manager-api/app/common"
|
||||||
|
"access-manager-api/app/ldap"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
common "user-manager-api/app/common"
|
|
||||||
"user-manager-api/app/ldap"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewPool(backends *UserSession, poolname string) (int, error) {
|
func NewPool(backends *UserSession, poolname string) (int, error) {
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"slices"
|
"slices"
|
||||||
|
|
||||||
common "user-manager-api/app/common"
|
common "access-manager-api/app/common"
|
||||||
|
|
||||||
"github.com/luthermonson/go-proxmox"
|
"github.com/luthermonson/go-proxmox"
|
||||||
)
|
)
|
||||||
|
|||||||
+2
-2
@@ -7,8 +7,8 @@ import (
|
|||||||
"github.com/gin-contrib/sessions"
|
"github.com/gin-contrib/sessions"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
localdb "user-manager-api/app/localdb"
|
localdb "access-manager-api/app/localdb"
|
||||||
pve "user-manager-api/app/pve"
|
pve "access-manager-api/app/pve"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Realm struct {
|
type Realm struct {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"listenPort": 8083,
|
"listenPort": 8083,
|
||||||
"sessionCookieName": "PAASUserManagerTicket",
|
"sessionCookieName": "PAASAccessManagerTicket",
|
||||||
"sessionCookie": {
|
"sessionCookie": {
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"httpOnly": true,
|
"httpOnly": true,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module user-manager-api
|
module access-manager-api
|
||||||
|
|
||||||
go 1.26.2
|
go 1.26.2
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=proxmoxaas-user-manager-api
|
Description=access-manager-api
|
||||||
After=network.target
|
After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/<path to dir>
|
WorkingDirectory=/<path to dir>
|
||||||
ExecStart=/<path to dir>/proxmoxaas-fabric
|
ExecStart=/<path to dir>/access-manager-api
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
Type=simple
|
Type=simple
|
||||||
+1
-1
@@ -1,8 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
app "access-manager-api/app"
|
||||||
"flag"
|
"flag"
|
||||||
app "user-manager-api/app"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user