Repository URL to install this package:
|
Version:
0.4.2 ▾
|
ó 6£ßNc @ s, d d l Z d d l Z d d l m Z m Z d d l m Z m Z d d l m Z m Z d d l m Z d d l m Z m Z m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d Z d Z d Z i d d 6d d 6Z d d d YZ d S( iÿÿÿÿN( t urlparset parse_qs( t Saml2Clientt LogoutError( t samlpt BINDING_HTTP_POST( t BINDING_SOAP( t samlt configt class_name( t Server( t decode_base64_and_inflate( t in_a_while( t Assertion( t Policy( t raisesc C s: x3 | j D]( } | j } | j j | k r t Sq Wd S( N( t audience_restrictiont audiencet textt stript True( t conditiont met restrictionR ( ( s@ /home/lgs/proyectos/yaco/pysaml2/pysaml2/tests/test_51_client.pyt for_me s c C se i } xX | j D]M } | j j } g | | <x+ | j D] } | | j | j j q9 Wq W| S( N( t attributet nameR t attribute_valuet appendR ( t attribute_statementt resultR R t value( ( s@ /home/lgs/proyectos/yaco/pysaml2/pysaml2/tests/test_51_client.pyt ava s "c C s t | t | k S( N( t set( t l1t l2( ( s@ /home/lgs/proyectos/yaco/pysaml2/pysaml2/tests/test_51_client.pyt _leq$ s sE <?xml version='1.0' encoding='UTF-8'?> <ns0:AttributeQuery Destination="https://idp.example.com/idp/" ID="id1" IssueInstant="%s" Version="2.0" xmlns:ns0="urn:oasis:names:tc:SAML:2.0:protocol"><ns1:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity" xmlns:ns1="urn:oasis:names:tc:SAML:2.0:assertion">urn:mace:example.com:saml:roland:sp</ns1:Issuer><ns1:Subject xmlns:ns1="urn:oasis:names:tc:SAML:2.0:assertion"><ns1:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">E8042FB4-4D5B-48C3-8E14-8EDD852790DD</ns1:NameID></ns1:Subject></ns0:AttributeQuery>s 1.2.14s <?xml version='1.0' encoding='UTF-8'?> <ns0:AttributeQuery xmlns:ns0="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:ns1="urn:oasis:names:tc:SAML:2.0:assertion" Destination="https://idp.example.com/idp/" ID="id1" IssueInstant="%s" Version="2.0"><ns1:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">urn:mace:example.com:saml:roland:sp</ns1:Issuer><ns1:Subject><ns1:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">E8042FB4-4D5B-48C3-8E14-8EDD852790DD</ns1:NameID></ns1:Subject></ns0:AttributeQuery>s 1.2.16t TestClientc B s³ e Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z RS( c C s; t d | _ t j } | j d t | | _ d S( Nt idp_conft server_conf( R t serverR t SPConfigt load_fileR t client( t selft conf( ( s@ /home/lgs/proyectos/yaco/pysaml2/pysaml2/tests/test_51_client.pyt setup_class9 s c C sù | j j d d d d t j } d | j } t d | j } | GH| | k sY t | j d k sn t | j d k s t | j d k s t | j } | j } | j t j k s t | j d k s× t | j } | j d k sõ t d S( Nt id1s$ E8042FB4-4D5B-48C3-8E14-8EDD852790DDs https://idp.example.com/idp/t nameid_formats %ss 1.2.16s 2.0s# urn:mace:example.com:saml:roland:sp( R+ t create_attribute_queryR t NAMEID_FORMAT_PERSISTENTt to_stringt REQ1t issue_instantt AssertionErrort destinationt idt versiont subjectt name_idt formatR t issuer( R, t reqt reqstrt expected_reqR: R; R= ( ( s@ /home/lgs/proyectos/yaco/pysaml2/pysaml2/tests/test_51_client.pyt test_create_attribute_query1@ s" c C s | j j d d d d i d d 6d d 6d d 6d t j } | j GH| j d k s\ t | j d k sq t | j d k s t | j } | j } | j t j k s° t | j d k sÅ t t | j d k sà t g } xþ | j D]ó } | j d k rB| j t j k st | j d k s2t | j d qð | j d k r| j t j k sit | j d k s~t | j d qð | j d k rð | j t j k sµt t | d rÓt sÓt n | j d qð qð Wt | d d d h k st d S( NR/ s$ E8042FB4-4D5B-48C3-8E14-8EDD852790DDs https://idp.example.com/idp/R s urn:oid:2.5.4.42s/ urn:oasis:names:tc:SAML:2.0:attrname-format:urit givenNames urn:oid:2.5.4.4t surnames urn:oid:1.2.840.113549.1.9.1R0 s 2.0i t friendly_namet email( s urn:oid:2.5.4.42s/ urn:oasis:names:tc:SAML:2.0:attrname-format:uris givenName( s urn:oid:2.5.4.4s/ urn:oasis:names:tc:SAML:2.0:attrname-format:uris surname( s urn:oid:1.2.840.113549.1.9.1s/ urn:oasis:names:tc:SAML:2.0:attrname-format:uri( R+ R1 t NoneR R2 R3 R7 R6 R8 R9 R: R; R<