1.2.2.7.1. login – Automatic and Semi-Automatic Gatorlink Login Handling

A module for handling Shibboleth related GatorLink logins.

class lib.browser.plugins.uf.login.LoginBrowserPlugin

Can handle pages asking for your GatorLink login information using the standard Shibboleth-based form. It works in 99% of login cases, and can even be set up to enter one’s password completely automatically, acting like a simple redirect.

__init__()

Instantiates a plugin instance, without any login information. To enable automatic logins, call uf_set_autologin().

uf_login(plugin, browser, username, password, *args, **kwargs)

A lib.browser.plugins.decorators.extension() that will submit a HTTP POST Request to login. Please note that urllib (or urllib2 in Python 2) does not perform SSL certificate authentication, so while the connection will be done over HTTPS, an active man-in-the-middle attack could potentially compromise your password, however the chance of that is quite rare. This function does not load the login page, nor does it need to, it simply submits the login form as though it had already loaded the login page.

uf_logout(plugin, browser, refresh=False)

Disables the auto-login system, and logs you out (by simply deleting the session cookie). The refresh argument can be used to call lib.browser.Browser.refresh(), returning the new result.

uf_set_autologin(plugin, browser, username=None, password=None, enabled=True)

A lib.browser.plugins.decorators.extension() that can be used to enable or disable automatic login handling.

uf_username(plugin, browser)

A lib.browser.plugins.decorators.property_extension() representing the plugin’s autologin username. Note that simply setting this does not enable autologin, that must be done with uf_set_autologin().

uf_password(plugin, browser)

A lib.browser.plugins.decorators.property_extension() representing the plugin’s autologin password. Note that simply setting this does not enable autologin, that must be done with uf_set_autologin(). As is the case with any tool using your password, make sure you do not load any rouge, untrusted plugins, as one could potentially steal your plaintext password with it.

A lib.browser.plugins.decorators.property_extension() that can get (but not set) a http.cookiejar.Cookie object containing the login state. If we have not not logged in, or our session is expired, gives None.

handle_redirect(plugin, browser, base_url, source, *args, **kwargs)

If plugin‘s _auto_login is True, handles a login page automatically.

class lib.browser.plugins.uf.login.LoginContinueRedirect

Handles Shibboleth redirection pages that need a specially-formed POST message to continue through. This is normally handed via JavaScript, but we’ll just handle this ourselves. This should be used with LoginBrowserPlugin.

__init__()
handle_redirect(plugin, browser, base_url, source, *args, **kwargs)

The function that does the magic of pulling the form data from the Shibboleth redirection page, and resubmits it.

Previous topic

1.2.2.7. plugins.uf – UF-Specific Plugins

Next topic

1.2.2.7.2. isis – Tools for Working With ISIS (Integrated Student Information System)

This Page