SAML-Toolkits / python3-saml

MIT License
683 stars 304 forks source link

Access NameID from OneLogin_Saml2_Logout_Request #189

Closed dgkatz closed 1 year ago

dgkatz commented 4 years ago

When i handle a slo request from IDP, i need to know which user needs to be logged out -- NameID. Is this possible?

Please advice.

pitbulk commented 4 years ago

With the process_slo method, the LogoutRequest is validated and then you can decide to kill the session associated with the browser, but you can as well keep_local_session=True and then use the get_nameid_data to retrieve the NameId Info. You only need to call the static method and provide the LogoutRequest XML that you can get from the auth. get_last_request_xml