authn_request.py

About this file

We attempted to read from templates/app_lib_onelogin_saml2_authn_request.py_hw.txt but failed.

Code Check Report


app/lib/onelogin/saml2/authn_request.py:98:121: E501 line too long (126 > 120 characters)
                        

Documentation drawn from source code

OneLogin_Saml2_Authn_Request class

Copyright (c) 2010-2018 OneLogin, Inc.
MIT License

AuthNRequest class of OneLogin's Python Toolkit.


OneLogin_Saml2_Authn_Request(object):


This class handles an AuthNRequest. It builds an
AuthNRequest object.


__init__(self, settings, force_authn=False, is_passive=False, set_nameid_policy=True):

Constructs the AuthnRequest object.

:param settings: OSetting data
:type settings: OneLogin_Saml2_Settings

:param force_authn: Optional argument. When true the AuthNRequest will set the ForceAuthn='true'.
:type force_authn: bool

:param is_passive: Optional argument. When true the AuthNRequest will set the Ispassive='true'.
:type is_passive: bool

:param set_nameid_policy: Optional argument. When true the AuthNRequest will set a nameIdPolicy element.
:type set_nameid_policy: bool
nameid_policy_str =
Format="%s
requested_authn_context_str = """
urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport

get_request(self, deflate=True):

Returns unsigned AuthnRequest.
:param deflate: It makes the deflate process optional
:type: bool
:return: AuthnRequest maybe deflated and base64 encoded
:rtype: str object

get_id(self):

Returns the AuthNRequest ID.
:return: AuthNRequest ID
:rtype: string

get_xml(self):

Returns the XML that will be sent as part of the request
:return: XML request body
:rtype: string

Source code