logout_response.py

About this file

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

Code Check Report


app/lib/onelogin/saml2/logout_response.py:41:121: E501 line too long (128 > 120 characters)
app/lib/onelogin/saml2/logout_response.py:88:121: E501 line too long (135 > 120 characters)
app/lib/onelogin/saml2/logout_response.py:97:121: E501 line too long (127 > 120 characters)
app/lib/onelogin/saml2/logout_response.py:101:121: E501 line too long (165 > 120 characters)
                        

Documentation drawn from source code

OneLogin_Saml2_Logout_Response class

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

Logout Response class of OneLogin's Python Toolkit.


OneLogin_Saml2_Logout_Response(object):


This class handles a Logout Response. It Builds or parses a Logout Response object
and validates it.


__init__(self, settings, response=None):

Constructs a Logout Response object (Initialize params from settings
and if provided load the Logout Response.

Arguments are:
* (OneLogin_Saml2_Settings) settings. Setting data
* (string) response. An UUEncoded SAML Logout
response from the IdP.

get_issuer(self):

Gets the Issuer of the Logout Response Message
:return: The Issuer
:rtype: string

get_status(self):

Gets the Status
:return: The Status
:rtype: string

is_valid(self, request_data, request_id=None, raise_exceptions=False):

Determines if the SAML LogoutResponse is valid
:param request_id: The ID of the LogoutRequest sent by this SP to the IdP
:type request_id: string

:param raise_exceptions: Whether to return false on failure or raise an exception
:type raise_exceptions: Boolean

:return: Returns if the SAML LogoutResponse is or not valid
:rtype: boolean

__query(self, query):

Extracts a node from the Etree (Logout Response Message)
:param query: Xpath Expression
:type query: string
:return: The queried node
:rtype: Element

build(self, in_response_to):

Creates a Logout Response object.
:param in_response_to: InResponseTo value for the Logout Response.
:type in_response_to: string

get_response(self, deflate=True):

Returns a Logout Response object.
:param deflate: It makes the deflate process optional
:type: bool
:return: Logout Response maybe deflated and base64 encoded
:rtype: string

get_error(self):

After executing a validation process, if it fails this method returns the cause

get_xml(self):

Returns the XML that will be sent as part of the response
or that was received at the SP
:return: XML response body
:rtype: string

Source code