sanskrit_data.schema.users¶
Intro¶
- For general context and class diagram, refer to
schema
.
-
class
sanskrit_data.schema.users.
AuthenticationInfo
[source]¶ Bases:
sanskrit_data.schema.common.JsonObject
-
VEDAVAAPI_AUTH
= 'vedavaapi'¶
-
schema
= {'required': ['jsonClass'], 'type': 'object', 'properties': {'auth_secret_plain': {'type': 'string', 'description': 'This should NEVER be set when stored in a database; but is good for client-server transmission purposes.'}, 'auth_provider': {'enum': ['google', 'vedavaapi'], 'type': 'string'}, 'auth_user_id': {'type': 'string'}, 'auth_secret_bcrypt': {'type': 'string', 'description': 'This should be hashed, and merits being stored in a database.'}, 'jsonClass': {'enum': ['AuthenticationInfo'], 'type': 'string'}}}¶
-
-
class
sanskrit_data.schema.users.
User
[source]¶ Bases:
sanskrit_data.schema.common.JsonObject
Represents a user of our service.
-
schema
= {'required': ['jsonClass'], 'type': 'object', 'properties': {'jsonClass': {'enum': ['User'], 'type': 'string'}, 'user_type': {'enum': ['human', 'bot'], 'type': 'string'}, 'authentication_infos': {'items': {'required': ['jsonClass'], 'type': 'object', 'properties': {'auth_secret_plain': {'type': 'string', 'description': 'This should NEVER be set when stored in a database; but is good for client-server transmission purposes.'}, 'auth_provider': {'enum': ['google', 'vedavaapi'], 'type': 'string'}, 'auth_user_id': {'type': 'string'}, 'auth_secret_bcrypt': {'type': 'string', 'description': 'This should be hashed, and merits being stored in a database.'}, 'jsonClass': {'enum': ['AuthenticationInfo'], 'type': 'string'}}}, 'type': 'array'}, 'permissions': {'items': {'required': ['jsonClass'], 'type': 'object', 'properties': {'actions': {'items': {'enum': ['read', 'write', 'admin'], 'type': 'string'}, 'type': 'array', 'description': 'Should be an enum in the future.'}, 'service': {'enum': ['.*', 'ullekhanam'], 'type': 'string', 'description': 'Allowable values should be predetermined regular expressions.'}, 'jsonClass': {'enum': ['UserPermission'], 'type': 'string'}}}, 'type': 'array'}}}¶
-
-
class
sanskrit_data.schema.users.
UserPermission
[source]¶ Bases:
sanskrit_data.schema.common.JsonObject
-
schema
= {'required': ['jsonClass'], 'type': 'object', 'properties': {'service': {'enum': ['.*', 'ullekhanam'], 'type': 'string', 'description': 'Allowable values should be predetermined regular expressions.'}, 'actions': {'items': {'enum': ['read', 'write', 'admin'], 'type': 'string'}, 'type': 'array', 'description': 'Should be an enum in the future.'}, 'jsonClass': {'enum': ['UserPermission'], 'type': 'string'}}}¶
-