예제 #1
0
파일: client.py 프로젝트: lppedd/labs
def register(account):
    if libsqrl.has_flag(account.tif, libsqrl.TIF.AccountCreationEnabled):
        payload = create_request_body(user, url, cmd='create')
        response = post_request(payload.serialize())
        if libsqrl.has_flag(response.tif, libsqrl.TIF.CommandFailed):
            print 'Error creating account.'
        else:
            #print response
            print 'Success'
    else:
        print 'Account registration is not enabled.'
예제 #2
0
def register(account):
    if libsqrl.has_flag(account.tif, libsqrl.TIF.AccountCreationEnabled):
        payload = create_request_body(user, url, cmd='create')
        response = post_request(payload.serialize())
        if libsqrl.has_flag(response.tif, libsqrl.TIF.CommandFailed):
            print 'Error creating account.'
        else:
            #print response
            print 'Success'
    else:
        print 'Account registration is not enabled.'
예제 #3
0
파일: client.py 프로젝트: lppedd/labs
def login(account):
    if libsqrl.has_flag(account.tif, libsqrl.TIF.IdMatch):
        payload = create_request_body(user, url, cmd='login')
        response = post_request(payload.serialize())
    else:
        print 'No account registered.'
예제 #4
0
def login(account):
    if libsqrl.has_flag(account.tif, libsqrl.TIF.IdMatch):
        payload = create_request_body(user, url, cmd='login')
        response = post_request(payload.serialize())
    else:
        print 'No account registered.'