def grantgetter(client_id, code): if not is_uuid4(client_id): return False return models.Grant.first(models.Grant.client.client_id == client_id, models.Grant.code == code)
def clientgetter(client_id): # FIXME Allow direct token access for dev with email/pwd if not is_uuid4(client_id): return False return models.Client.first(models.Client.client_id == client_id)