Skip to content

Commit

Permalink
refactor: move LDAP helper into it's own repository
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDevMinerTV committed Jun 28, 2023
1 parent 8c1414e commit 1f7591f
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 202 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/netresearch/simple-ldap-go v0.0.0-20230628081923-f17d668afd54 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp9
github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/netresearch/simple-ldap-go v0.0.0-20230628081923-f17d668afd54 h1:mOw2DDPlmutvBDeGptyu4fp76nP4ctGIrqz/dp2/gls=
github.com/netresearch/simple-ldap-go v0.0.0-20230628081923-f17d668afd54/go.mod h1:l2QlOx+RzW/lx/3OfCJX3JE1leMKN0YQLtz1n2sngSM=
github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw=
github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0=
Expand Down
2 changes: 1 addition & 1 deletion internal/server/auth_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package server
import (
"encoding/base64"
"errors"
"raybeam/pkg/ldap"
"strings"

ldap2 "github.com/go-ldap/ldap/v3"
ldap "github.com/netresearch/simple-ldap-go"

"github.com/gofiber/fiber/v2"
)
Expand Down
3 changes: 2 additions & 1 deletion internal/server/auth_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"fmt"
"net/url"
"os"
"raybeam/pkg/ldap"
"strings"
"testing"

ldap "github.com/netresearch/simple-ldap-go"
)

func TestBasicAuthWithNonBasicAuthHeader(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/server/route_ssh_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"errors"
"fmt"
"raybeam/internal/models"
"raybeam/pkg/ldap"
"strings"

"github.com/gofiber/fiber/v2"
ldap "github.com/netresearch/simple-ldap-go"
"go.etcd.io/bbolt"
"golang.org/x/crypto/ssh"
)
Expand Down
3 changes: 1 addition & 2 deletions internal/server/service.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package server

import (
"raybeam/pkg/ldap"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
ldap "github.com/netresearch/simple-ldap-go"
"go.etcd.io/bbolt"
)

Expand Down
21 changes: 0 additions & 21 deletions pkg/ldap/auth.go

This file was deleted.

83 changes: 0 additions & 83 deletions pkg/ldap/auth_test.go

This file was deleted.

34 changes: 0 additions & 34 deletions pkg/ldap/client.go

This file was deleted.

59 changes: 0 additions & 59 deletions pkg/ldap/search.go

This file was deleted.

0 comments on commit 1f7591f

Please sign in to comment.