Additional structures needed for Book Someplace users include information needed to log in, and other information needed to facilitate demographic reports. Here is an example of two additional structures:
OtherInfo = {
"gender" : <genderType>,
"age" : <int>
}
LoginInfo = {
"username" : <name used to login>,
"oauth2" : <OAUTH2 login credentials>,
"password" : <BCRYPT password>
}
Common = [
{ "genderType" : [{'M' : 'Male'},{'F' : 'Female'},{'X' : 'Other'}] }
]
We provide an oauth2 option in order to allow users to authenticate using Google, Facebook, Twitter, and so on. The password is stored in a secure manner. Another politically sensitive issue is gender, so we add an option; that is, X.
Now, let's turn our attention to defining a Property structure.