This commit is contained in:
@@ -25,7 +25,7 @@ steps:
|
|||||||
#debug: true
|
#debug: true
|
||||||
restore: true
|
restore: true
|
||||||
cache_key: '{{ .Repo.Name }}_{{ arch }}_{{ os }}'
|
cache_key: '{{ .Repo.Name }}_{{ arch }}_{{ os }}'
|
||||||
archive_format: "gzip"
|
archive_format: "tar"
|
||||||
filesystem_cache_root: "/go"
|
filesystem_cache_root: "/go"
|
||||||
local_root: /
|
local_root: /
|
||||||
mount:
|
mount:
|
||||||
@@ -56,7 +56,7 @@ steps:
|
|||||||
#debug: true
|
#debug: true
|
||||||
rebuild: true
|
rebuild: true
|
||||||
cache_key: '{{ .Repo.Name }}_{{ arch }}_{{ os }}'
|
cache_key: '{{ .Repo.Name }}_{{ arch }}_{{ os }}'
|
||||||
archive_format: "gzip"
|
archive_format: "tar"
|
||||||
filesystem_cache_root: "/go"
|
filesystem_cache_root: "/go"
|
||||||
mount:
|
mount:
|
||||||
- pkg.mod
|
- pkg.mod
|
||||||
|
@@ -124,9 +124,9 @@ func VerifyLdapCreds(username string, password string) bool {
|
|||||||
defer ldaps.Close()
|
defer ldaps.Close()
|
||||||
|
|
||||||
// try to bind to AD
|
// try to bind to AD
|
||||||
|
log.Printf("Attempting LDAP bind with user '%s' and password '%s'\n", username, password)
|
||||||
err = ldaps.Bind(username, password)
|
err = ldaps.Bind(username, password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
if ldapErr, ok := err.(*ldap.Error); ok && ldapErr.ResultCode == ldap.LDAPResultInvalidCredentials {
|
if ldapErr, ok := err.(*ldap.Error); ok && ldapErr.ResultCode == ldap.LDAPResultInvalidCredentials {
|
||||||
log.Printf("VerifyLdapCreds user credentials are incorrect\n")
|
log.Printf("VerifyLdapCreds user credentials are incorrect\n")
|
||||||
return false
|
return false
|
||||||
|
@@ -111,7 +111,7 @@ func LoginCheck(username string, password string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO : attempt ldap bind
|
// TODO : attempt ldap bind
|
||||||
VerifyLdapCreds(username, password)
|
//VerifyLdapCreds(username, password)
|
||||||
|
|
||||||
err = VerifyPassword(password, u.Password)
|
err = VerifyPassword(password, u.Password)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user