コード例 #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
ファイル: client.py プロジェクト: ademirzanetti/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.'
コード例 #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
ファイル: client.py プロジェクト: ademirzanetti/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.'