Changeset 6902 for TI12-security/trunk


Ignore:
Timestamp:
28/05/10 13:04:48 (9 years ago)
Author:
pjkersha
Message:

Incomplete - task 6: Put NDG SAML package on PyPI

  • updating epydoc for 'core' module
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/ndg_saml/ndg/saml/saml2/core.py

    r6901 r6902  
    685685class AuthzDecisionStatement(Statement): 
    686686    '''SAML 2.0 Core AuthzDecisionStatement.  Currently implemented in abstract 
    687     form only''' 
     687    form only 
     688 
     689    @cvar DEFAULT_ELEMENT_LOCAL_NAME: Element local name 
     690    @type DEFAULT_ELEMENT_LOCAL_NAME: string 
     691    @cvar DEFAULT_ELEMENT_NAME: Default element name 
     692    @type DEFAULT_ELEMENT_NAME: ndg.saml.common.xml.QName 
     693    @cvar TYPE_LOCAL_NAME: Local name of the XSI type 
     694    @type TYPE_LOCAL_NAME: string 
     695    @cvar TYPE_NAME: QName of the XSI type 
     696    @type TYPE_NAME: ndg.saml.common.xml.QName 
     697    @cvar RESOURCE_ATTRIB_NAME: Resource attribute name 
     698    @type RESOURCE_ATTRIB_NAME: string 
     699    @cvar DECISION_ATTRIB_NAME: Decision attribute name 
     700    @type DECISION_ATTRIB_NAME: string 
     701     
     702    @ivar __resource: identifier for the resource which is the subject of the  
     703    authorisation statement 
     704    @type __resource: basestring 
     705    @ivar __decision: decision type for this authorisation statement 
     706    @type __decision: ndg.saml.saml2.core.DecisionType 
     707    @ivar __actions: list of ndg.saml.saml2.core.Action elements 
     708    @type __actions: ndg.saml.utils.TypedList 
     709    @ivar __evidence: evidence (not currently implemented) 
     710    @type __evidence: None 
     711    @ivar __normalizeResource: set to True to normalize the URI object attribute 
     712    in the set property method (functionality likely to be deprecated) 
     713    @type __normalizeResource: bool 
     714    @ivar __safeNormalizationChars: acceptable characters for normalizing URIs 
     715    (functionality likely to be deprecated) 
     716    @type __safeNormalizationChars: string 
     717    ''' 
    688718     
    689719    # Element local name 
     
    715745        '__evidence', 
    716746        '__normalizeResource', 
    717         '__safeNormalizationChars') 
     747        '__safeNormalizationChars' 
     748    ) 
    718749     
    719750    def __init__(self,  
     
    722753                 **kw): 
    723754        '''Create new authorisation decision statement 
     755        @param normalizeResource: set to True to normalize the URI object  
     756        attribute in the set property method (functionality likely to be  
     757        deprecated) 
     758        @type normalizeResource: bool 
     759        @param safeNormalizationChars: acceptable characters for normalizing  
     760        URIs (functionality likely to be deprecated) 
     761        @type safeNormalizationChars: string 
     762        @param **kw: keywords for the initialisation of the parent classes' 
     763        attributes 
     764        @type **kw: dict 
    724765        ''' 
    725766        super(AuthzDecisionStatement, self).__init__(**kw) 
     
    755796     
    756797    def _getNormalizeResource(self): 
     798        '''Get normalise resource flag 
     799        @return: flag value 
     800        @rtype: bool         
     801        ''' 
    757802        return self.__normalizeResource 
    758803 
    759804    def _setNormalizeResource(self, value): 
     805        '''Set normalise resource flag 
     806        @param value: flag value 
     807        @type value: bool 
     808        @raise TypeError: input value is incorrect type 
     809        ''' 
    760810        if not isinstance(value, bool): 
    761811            raise TypeError('Expecting bool type for "normalizeResource" ' 
     
    772822 
    773823    def _getSafeNormalizationChars(self): 
     824        '''Get normalisation safe chars 
     825        @return: normalisation safe chars 
     826        @rtype value: basetring 
     827        ''' 
    774828        return self.__safeNormalizationChars 
    775829 
    776830    def _setSafeNormalizationChars(self, value): 
     831        '''Set normalisation safe chars 
     832        @param value: normalisation safe chars 
     833        @type value: basetring 
     834        @raise TypeError: input value is incorrect type 
     835        ''' 
    777836        if not isinstance(value, basestring): 
    778837            raise TypeError('Expecting string type for "normalizeResource" ' 
     
    792851 
    793852    def _getResource(self): 
    794         '''Gets the Resource attrib value of this query. 
    795  
    796         @return: the Resource attrib value of this query''' 
     853        '''Gets the Resource attrib value of this statement. 
     854 
     855        @return: the Resource attrib value of this statement 
     856        @rtype: basestring 
     857        ''' 
    797858        return self.__resource 
    798859     
    799860    def _setResource(self, value): 
    800         '''Sets the Resource attrib value of this query normalizing the path 
     861        '''Sets the Resource attrib value of this statement normalizing the path 
    801862        component, removing spurious port numbers (80 for HTTP and 443 for  
    802863        HTTPS) and converting the host component to lower case. 
    803864         
    804         @param value: the new Resource attrib value of this query''' 
     865        @param value: the new Resource attrib value of this statement 
     866        @type: basestring 
     867        @raise TypeError: input value is incorrect type 
     868        ''' 
    805869        if not isinstance(value, basestring): 
    806870            raise TypeError('Expecting string type for "resource" attribute; ' 
     
    850914         
    851915        @param value: the decision of the authorization request 
     916        @raise TypeError: input value is incorrect type 
    852917        ''' 
    853918        if not isinstance(value, DecisionType): 
     
    863928        '''The actions for which authorisation is requested 
    864929         
    865         @return: the Actions of this statement''' 
     930        @return: the Actions of this statement 
     931        @rtype: TypedList 
     932        ''' 
    866933        return self.__actions 
    867934    
    868935    def _getEvidence(self): 
    869         '''Gets the Evidence of this statement. 
    870  
    871         @return: the Evidence of this statement''' 
     936        '''Gets the Evidence of this statement.  Evidence attribute  
     937        functionality is not currently implemented in this class 
     938 
     939        @return: the Evidence of this statement 
     940        @rtype: None''' 
    872941        return self.__evidence 
    873942 
    874943    def _setEvidence(self, value): 
    875         '''Sets the Evidence of this query. 
    876         @param newEvidence: the new Evidence of this statement'''   
     944        '''Sets the Evidence of this statement.  Evidence attribute  
     945        functionality is not currently implemented in this class 
     946         
     947        @param value: the new Evidence of this statement  
     948        @type value: None  
     949        @raise TypeError: input value is incorrect type 
     950        ''' 
    877951        if not isinstance(value, Evidence): 
    878952            raise TypeError('Expecting Evidence type for "evidence" ' 
     
    886960     
    887961    def getOrderedChildren(self): 
     962        """Get ordered children 
     963        @return: list actions and evidence for this statement 
     964        @rtype: tuple 
     965        """ 
    888966        children = [] 
    889967 
     
    904982 
    905983class Subject(SAMLObject): 
    906     '''Concrete implementation of @link org.opensaml.saml2.core.Subject.''' 
     984    '''Implementation of SAML 2.0 Subject 
     985     
     986    @cvar DEFAULT_ELEMENT_LOCAL_NAME: Element local name. 
     987    @type DEFAULT_ELEMENT_LOCAL_NAME: string 
     988    @cvar DEFAULT_ELEMENT_NAME: Default element name. 
     989    @type DEFAULT_ELEMENT_NAME: ndg.saml.common.xml.QName 
     990    @cvar TYPE_LOCAL_NAME: Local name of the XSI type. 
     991    @type TYPE_LOCAL_NAME: string 
     992    @cvar TYPE_NAME: QName of the XSI type. 
     993    @type TYPE_NAME: ndg.saml.common.xml.QName 
     994     
     995    @ivar __baseID: 
     996    @type __baseID: 
     997    @ivar __nameID: 
     998    @type __nameID: 
     999    @ivar __encryptedID: 
     1000    @type __encryptedID: 
     1001    @ivar __subjectConfirmations: 
     1002    @type __subjectConfirmations:     
     1003    ''' 
    9071004     
    9081005    # Element local name. 
     
    9211018                      TYPE_LOCAL_NAME, 
    9221019                      SAMLConstants.SAML20_PREFIX) 
     1020     
    9231021    __slots__ = ( 
    9241022        '__baseID', 
     
    9491047        @rtype: dict 
    9501048        ''' 
    951  
    9521049        _dict = super(Subject, self).__getstate__() 
    9531050        for attrName in Subject.__slots__: 
Note: See TracChangeset for help on using the changeset viewer.