Changeset 7634


Ignore:
Timestamp:
20/10/10 21:23:29 (9 years ago)
Author:
pjkersha
Message:

0.5.1 Release - fixes:

Location:
TI12-security/trunk/ndg_saml
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/ndg_saml/documentation/Makefile

    r7140 r7634  
    3232 
    3333clean: 
    34         rm -f *.txt *.html *.gif 
     34        rm -f *.txt *.html *.gif *.png *.zip *.css *.js *.log 
  • TI12-security/trunk/ndg_saml/ndg/saml/saml2/binding/soap/client/subjectquery.py

    r7322 r7634  
    1515from uuid import uuid4 
    1616 
    17 from ndg.saml.common import SAMLObject 
    1817from ndg.saml.utils import SAMLDateTime 
    19 from ndg.saml.saml2.core import (SubjectQuery, StatusCode, Response, 
    20                              Issuer, Subject, SAMLVersion, NameID) 
     18from ndg.saml.saml2.core import (SubjectQuery, StatusCode, Issuer, Subject,  
     19                                 SAMLVersion, NameID) 
    2120 
    2221from ndg.saml.utils import str2Bool 
     
    342341        if response.inResponseTo != self.query.id: 
    343342            msg = ('Response in-response-to ID %r, doesn\'t match the original ' 
    344                    'query ID, %r' % (response.inResponseTo, query.id)) 
     343                   'query ID, %r' % (response.inResponseTo, self.query.id)) 
    345344             
    346345            samlRespError = SubjectQueryResponseError(msg) 
  • TI12-security/trunk/ndg_saml/ndg/saml/saml2/binding/soap/server/wsgi/queryinterface.py

    r7526 r7634  
    391391         
    392392        log.debug("SOAPQueryInterfaceMiddleware.__call__: received SAML " 
    393                   "SOAP SQuery ...") 
     393                  "SOAP Query: %s", soapRequestTxt) 
    394394        
    395395        queryElem = soapRequest.body.elem[0] 
  • TI12-security/trunk/ndg_saml/ndg/saml/test/test_saml.py

    r7130 r7634  
    3939from xml.etree import ElementTree 
    4040 
     41from ndg.saml.utils import SAMLDateTime 
    4142from ndg.saml.saml2.core import (SAMLVersion, Attribute, AttributeStatement,  
    4243                                 AuthzDecisionStatement, Assertion,  
     
    742743                        ].decision == DecisionType.PERMIT)         
    743744         
     745    def test17SAMLDatetime(self): 
     746        # Test parsing of Datetimes following  
     747        # http://www.w3.org/TR/xmlschema-2/#dateTime  
     748         
     749        # No seconds fraction 
     750        self.assert_(SAMLDateTime.fromString('2010-10-20T14:49:50Z')) 
     751         
     752        self.assertRaises(TypeError, SAMLDateTime.fromString,  
     753                          None) 
     754         
     755         
    744756if __name__ == "__main__": 
    745757    unittest.main()         
  • TI12-security/trunk/ndg_saml/ndg/saml/utils/__init__.py

    r7143 r7634  
    8181        # Workaround for seconds fraction as strptime doesn't seem able to deal 
    8282        # with this  
    83         strDateTimeFraction, strSecondsFraction = strDateTime.split('.') 
     83        dateTimeTuple = strDateTime.split('.') 
     84         
     85        # Seconds fraction may not be present - see 
     86        # http://www.w3.org/TR/xmlschema-2/#dateTime - explicitly test for ... 
     87        if len(dateTimeTuple) == 2: 
     88            strDateTimeFraction, strSecondsFraction = dateTimeTuple 
     89            secondsFraction = float("0." + strSecondsFraction.replace('Z', '')) 
     90        else: 
     91            strDateTimeFraction = dateTimeTuple[0].replace('Z', '') 
     92            secondsFraction = 0. 
     93             
    8494        dtValue = datetime.strptime(strDateTimeFraction, cls.DATETIME_FORMAT) 
    85         secondsFraction = float("0." + strSecondsFraction.replace('Z', '')) 
    8695        dtValue += timedelta(seconds=secondsFraction) 
     96         
    8797        return dtValue 
    8898 
  • TI12-security/trunk/ndg_saml/setup.py

    r7562 r7634  
    5050setup( 
    5151    name =                      'ndg_saml', 
    52     version =                   '0.5', 
     52    version =                   '0.5.1', 
    5353    description =               ('SAML 2.0 implementation for the NERC DataGrid ' 
    5454                             'based on the Java OpenSAML library'), 
Note: See TracChangeset for help on using the changeset viewer.