Explorar o código

improve attributes map key

Jonathan Turner %!s(int64=9) %!d(string=hai) anos
pai
achega
3e2b99589b
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      credentials/credentials.go

+ 3 - 3
credentials/credentials.go

@@ -21,7 +21,7 @@ type Credentials struct {
 	CName      types.PrincipalName
 	CName      types.PrincipalName
 	Keytab     keytab.Keytab
 	Keytab     keytab.Keytab
 	Password   string
 	Password   string
-	Attributes map[string]interface{}
+	Attributes map[int]interface{}
 }
 }
 
 
 // ADCredentials contains information obtained from the PAC.
 // ADCredentials contains information obtained from the PAC.
@@ -49,7 +49,7 @@ func NewCredentials(username string, realm string) Credentials {
 			NameString: []string{username},
 			NameString: []string{username},
 		},
 		},
 		Keytab:     keytab.NewKeytab(),
 		Keytab:     keytab.NewKeytab(),
-		Attributes: make(map[string]interface{}),
+		Attributes: make(map[int]interface{}),
 	}
 	}
 }
 }
 
 
@@ -60,7 +60,7 @@ func NewCredentialsFromPrincipal(cname types.PrincipalName, realm string) Creden
 		Realm:      realm,
 		Realm:      realm,
 		CName:      cname,
 		CName:      cname,
 		Keytab:     keytab.NewKeytab(),
 		Keytab:     keytab.NewKeytab(),
-		Attributes: make(map[string]interface{}),
+		Attributes: make(map[int]interface{}),
 	}
 	}
 }
 }