allow blockchain_id to be null (for anonymous login)

This commit is contained in:
Jude Nelson
2017-06-22 17:15:44 -04:00
parent a47550905a
commit c488e7a531
2 changed files with 14 additions and 3 deletions

View File

@@ -466,7 +466,7 @@ class BlockstackAPIEndpointHandler(SimpleHTTPRequestHandler):
app_private_key = '0000000000000000000000000000000000000000000000000000000000000001'
app_public_keys = {}
requester_device_id = ''
blockchain_id = ''
blockchain_id = None
else:
# current

View File

@@ -716,8 +716,15 @@ APP_INFO_PROPERTIES = {
'maximum': 1,
},
'blockchain_id': {
'type': 'string',
'pattern': OP_NAME_PATTERN,
'anyOf': [
{
'type': 'string',
'pattern': OP_NAME_PATTERN,
},
{
'type': 'null',
},
],
},
'app_domain': {
'anyOf': [
@@ -833,6 +840,10 @@ APP_SESSION_SCHEMA = {
'required': APP_SESSION_PROPERTIES.keys(),
}
APP_SESSION_SCHEMA_ANONYMOUS = {
'type': 'object',
'properties': APP_SESSION_PROPERTIES
# authentication-request payload
APP_SESSION_REQUEST_SCHEMA = {
'type': 'object',