ECPAuthSessionMixin#
- class requests_ecp.ECPAuthSessionMixin(idp=None, kerberos=False, username=None, password=None, **kwargs)[source]#
Bases:
object
A mixin for
requests.Session
to add default ECP Auth.This creates a default
auth
attribute on createdSession
objects as an instance of theHTTPECPAuth
authorisation plugin:from requests import Session from requests_ecp import ECPAuthSessionMixin class MySession(ECPAuthSessionMixin, Session): pass
This can be mixed with any other
Session
mixins, but beware of the inheritance order that may impact which mixin preserves the finalauth
attribute.See also
requests_ecp.Session
For a ready-made wrapped
Session
.