File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH
115115github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb /go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q =
116116github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 /go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q =
117117github.com/go-kit/kit v0.8.0 /go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as =
118+ github.com/go-ldap/ldap v3.0.2+incompatible h1:kD5HQcAzlQ7yrhfn+h+MSABeAy/jAJhvIJ/QDllP44g =
118119github.com/go-ldap/ldap v3.0.2+incompatible /go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc =
119120github.com/go-logfmt/logfmt v0.3.0 /go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE =
120121github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI =
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package restapi
1919import (
2020 "context"
2121 "errors"
22+ "fmt"
2223 "log"
2324
2425 "github.com/go-openapi/runtime/middleware"
@@ -29,6 +30,7 @@ import (
2930 "github.com/minio/mcs/pkg/auth/utils"
3031 "github.com/minio/mcs/restapi/operations"
3132 "github.com/minio/mcs/restapi/operations/user_api"
33+ cr "github.com/minio/minio-go/v6/pkg/credentials"
3234)
3335
3436var (
@@ -62,8 +64,21 @@ func registerLoginHandlers(api *operations.McsAPI) {
6264 })
6365}
6466
67+ func connectLdap () {
68+ li , err := cr .NewLDAPIdentity (getMinIOServer (), "billy" , "billy" )
69+ if err != nil {
70+ log .Println ("INIT Err: %v" , err )
71+ }
72+ v , err := li .Get ()
73+ if err != nil {
74+ log .Println ("GET Err: %v" , err )
75+ }
76+ fmt .Printf ("%#v\n " , v )
77+ }
78+
6579// login performs a check of minioCredentials against MinIO
6680func login (credentials MCSCredentials ) (* string , error ) {
81+ connectLdap ()
6782 // try to obtain minioCredentials,
6883 tokens , err := credentials .Get ()
6984 if err != nil {
You can’t perform that action at this time.
0 commit comments