Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Attempt to authenticate to Ampache.

Returns auth data if successful and False if not.

src/v/i/Viridian-HEAD/tests/auth.py   Viridian(Download)
# Auth
if ampache_conn.has_credentials():
    if ampache_conn.authenticate():
        print json.dumps(ampache_conn.auth_data, indent=4)
    else:

src/v/i/Viridian-HEAD/tests/artists.py   Viridian(Download)
ampache_conn.set_credentials(conf['username'], conf['password'], conf['url'])
 
if not ampache_conn.authenticate():
    print >>sys.stderr, 'Failed to authenticate!'
    sys.exit(2)