This commit is contained in:
@@ -103,7 +103,7 @@ func loadLdapCert() {
|
|||||||
// Get the certificate from the file
|
// Get the certificate from the file
|
||||||
cpb, _ := pem.Decode(cf)
|
cpb, _ := pem.Decode(cf)
|
||||||
crt, err := x509.ParseCertificate(cpb.Bytes)
|
crt, err := x509.ParseCertificate(cpb.Bytes)
|
||||||
//fmt.Printf("Loaded certificate with subject %s\n", crt.Subject)
|
//log.Printf("Loaded certificate with subject %s\n", crt.Subject)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("LoadLdapCert error processing LDAP certificate file '%s' : '%s'\n", ldapCertFile, err)
|
log.Printf("LoadLdapCert error processing LDAP certificate file '%s' : '%s'\n", ldapCertFile, err)
|
||||||
|
@@ -149,7 +149,7 @@ func LoginCheck(username string, password string) (string, error) {
|
|||||||
log.Printf("LoginCheck retrieved user '%v' from database\n", u)
|
log.Printf("LoginCheck retrieved user '%v' from database\n", u)
|
||||||
}
|
}
|
||||||
|
|
||||||
//log.Printf("u: %v\n", u)
|
log.Printf("u: %v\n", u)
|
||||||
|
|
||||||
if !u.LdapUser {
|
if !u.LdapUser {
|
||||||
// Locally defined user, perform password verification
|
// Locally defined user, perform password verification
|
||||||
@@ -180,6 +180,7 @@ func LoginCheck(username string, password string) (string, error) {
|
|||||||
|
|
||||||
// If we reached this point then the login was successful
|
// If we reached this point then the login was successful
|
||||||
// Generate a new token and return it to the user
|
// Generate a new token and return it to the user
|
||||||
|
log.Printf("LoginCheck generating token for user id '%d'\n", uint(u.UserId))
|
||||||
token, err := token.GenerateToken(uint(u.UserId))
|
token, err := token.GenerateToken(uint(u.UserId))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user