FAQ | This is a LIVE service | Changelog

Support authenticated connections

Created by: rjw57

Currently the lookup connection is created in ucamlookup.utils by simply calling createConnection. Extend this to allow configuration of the connection by Django settings. This will allow using a group's credentials to authenticate.

Suggested settings:

  • UCAMLOOKUP_HOST. Optional. Default: "www.lookup.cam.ac.uk"
  • UCAMLOOKUP_PORT. Optional. Default: 443
  • UCAMLOOKUP_URL_BASE. Optional. Default: ""
  • UCAMLOOKUP_CHECK_CERTS. Optional. Default: True
  • UCAMLOOKUP_USERNAME. Optional. Default: None
  • UCAMLOOKUP_PASSWORD. Optional. Default: None.

Apart from the username and password settings, these are passed directly to the IbisClientConnection constructor. If non-None, the username is set on the connection via the set_username method. If non-None, the password is set on the connection via the set_password method.