- re-enable return_fields specification
[plcapi.git] / PLC / Methods / GetKeyTypes.py
index 64e9399..f8a554b 100644 (file)
@@ -2,20 +2,20 @@ from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
 from PLC.KeyTypes import KeyType, KeyTypes
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
 
 class GetKeyTypes(Method):
     """
-    Returns a list of all valid key types.
+    Returns an array of all valid key types.
     """
 
     roles = ['admin', 'pi', 'user', 'tech']
 
     accepts = [
-        PasswordAuth()
+        Auth()
         ]
 
     returns = [KeyType.fields['key_type']]
 
     def call(self, auth):
-        return [key_type['key_type'] for key_type in KeyTypes(self.api).values()]
+        return [key_type['key_type'] for key_type in KeyTypes(self.api)]