Package ndg :: Package saml :: Package saml2 :: Module core :: Class AuthzDecisionStatement
[hide private]

Class AuthzDecisionStatement

source code


SAML 2.0 Core AuthzDecisionStatement. Currently implemented in abstract form only

Instance Methods [hide private]
 
__init__(self, normalizeResource=True, safeNormalizationChars='/%', **kw)
Create new authorisation decision statement
source code
dict
__getstate__(self)
Enable pickling
source code
bool
_getNormalizeResource(self)
Get normalise resource flag
source code
 
_setNormalizeResource(self, value)
Set normalise resource flag
source code
basetring
_getSafeNormalizationChars(self)
Get normalisation safe chars
source code
 
_setSafeNormalizationChars(self, value)
Set normalisation safe chars
source code
basestring
_getResource(self)
Gets the Resource attrib value of this statement.
source code
 
_setResource(self, value)
Sets the Resource attrib value of this statement normalizing the path component, removing spurious port numbers (80 for HTTP and 443 for HTTPS) and converting the host component to lower case.
source code
 
_getDecision(self)
Gets the decision of the authorization request.
source code
 
_setDecision(self, value)
Sets the decision of the authorization request.
source code
None
_getEvidence(self)
Gets the Evidence of this statement.
source code
 
_setEvidence(self, value)
Sets the Evidence of this statement.
source code
tuple
getOrderedChildren(self)
Get ordered children
source code

Inherited from common.SAMLObject: __setstate__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from common.SAMLObject: fromXML, toXML

Class Variables [hide private]
None DEFAULT_ELEMENT_LOCAL_NAME = 'AuthzDecisionStatement'
default XML element name - derived classes must specify
ndg.saml.common.xml.QName DEFAULT_ELEMENT_NAME = QName(SAMLConstants.SAML20_NS, DEFAULT_...
Default element name
string TYPE_LOCAL_NAME = 'AuthzDecisionStatementType'
Local name of the XSI type
ndg.saml.common.xml.QName TYPE_NAME = QName(SAMLConstants.SAML20_NS, TYPE_LOCAL_NAME, SA...
QName of the XSI type
string RESOURCE_ATTRIB_NAME = 'Resource'
Resource attribute name
string DECISION_ATTRIB_NAME = 'Decision'
Decision attribute name
Instance Variables [hide private]
ndg.saml.utils.TypedList __actions
list of ndg.saml.saml2.core.Action elements
ndg.saml.saml2.core.DecisionType __decision
decision type for this authorisation statement
None __evidence
evidence (not currently implemented)
bool __normalizeResource
set to True to normalize the URI object attribute in the set property method (functionality likely to be deprecated)
basestring __resource
identifier for the resource which is the subject of the authorisation statement
string __safeNormalizationChars
acceptable characters for normalizing URIs (functionality likely to be deprecated)
Properties [hide private]
  normalizeResource
Flag to normalize new resource value assigned to the "resource" property.
  safeNormalizationChars
String containing a list of characters that should not be converted when Normalizing the resource URI.
  resource
Resource for which authorisation was requested
  decision
Authorization decision as a DecisionType instance
TypedList actions
The actions for which authorisation is requested
  evidence
A set of assertions which the Authority may use to base its authorisation decision on

Inherited from common.SAMLObject: qname

Inherited from object: __class__

Method Details [hide private]

__init__(self, normalizeResource=True, safeNormalizationChars='/%', **kw)
(Constructor)

source code 

Create new authorisation decision statement

Parameters:
  • normalizeResource (bool) - set to True to normalize the URI object attribute in the set property method (functionality likely to be deprecated)
  • safeNormalizationChars (string) - acceptable characters for normalizing URIs (functionality likely to be deprecated)
  • kw (dict) - keywords for the initialisation of the parent classes' attributes
Overrides: object.__init__

__getstate__(self)

source code 

Enable pickling

Returns: dict
object's attribute dictionary
Overrides: common.SAMLObject.__getstate__

_getNormalizeResource(self)

source code 

Get normalise resource flag

Returns: bool
flag value

_setNormalizeResource(self, value)

source code 

Set normalise resource flag

Parameters:
  • value (bool) - flag value
Raises:
  • TypeError - input value is incorrect type

_getSafeNormalizationChars(self)

source code 

Get normalisation safe chars

Returns: basetring
normalisation safe chars

_setSafeNormalizationChars(self, value)

source code 

Set normalisation safe chars

Parameters:
  • value (basetring) - normalisation safe chars
Raises:
  • TypeError - input value is incorrect type

_getResource(self)

source code 

Gets the Resource attrib value of this statement.

Returns: basestring
the Resource attrib value of this statement

_setResource(self, value)

source code 

Sets the Resource attrib value of this statement normalizing the path component, removing spurious port numbers (80 for HTTP and 443 for HTTPS) and converting the host component to lower case.

Parameters:
  • value (basestring) - the new Resource attrib value of this statement
Raises:
  • TypeError - input value is incorrect type

_getDecision(self)

source code 

Gets the decision of the authorization request.

Returns:
the decision of the authorization request

_setDecision(self, value)

source code 

Sets the decision of the authorization request.

Parameters:
  • value - the decision of the authorization request
Raises:
  • TypeError - input value is incorrect type

_getEvidence(self)

source code 

Gets the Evidence of this statement. Evidence attribute functionality is not currently implemented in this class

Returns: None
the Evidence of this statement

_setEvidence(self, value)

source code 

Sets the Evidence of this statement. Evidence attribute functionality is not currently implemented in this class

Parameters:
  • value (None) - the new Evidence of this statement
Raises:
  • TypeError - input value is incorrect type

getOrderedChildren(self)

source code 

Get ordered children

Returns: tuple
list actions and evidence for this statement

Class Variable Details [hide private]

DEFAULT_ELEMENT_NAME

Default element name
Type:
ndg.saml.common.xml.QName
Value:
QName(SAMLConstants.SAML20_NS, DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstan\
ts.SAML20_PREFIX)

TYPE_NAME

QName of the XSI type
Type:
ndg.saml.common.xml.QName
Value:
QName(SAMLConstants.SAML20_NS, TYPE_LOCAL_NAME, SAMLConstants.SAML20_P\
REFIX)

Property Details [hide private]

normalizeResource

Flag to normalize new resource value assigned to the "resource" property. The setting only applies for URIs beginning with "http://" or "https://"

Get Method:
_getNormalizeResource(self) - Get normalise resource flag
Set Method:
_setNormalizeResource(self, value) - Set normalise resource flag

safeNormalizationChars

String containing a list of characters that should not be converted when Normalizing the resource URI. These are passed to urllib.quote when the resource property is set. The default characters are '/%'

Get Method:
_getSafeNormalizationChars(self) - Get normalisation safe chars
Set Method:
_setSafeNormalizationChars(self, value) - Set normalisation safe chars

resource

Resource for which authorisation was requested

Get Method:
_getResource(self) - Gets the Resource attrib value of this statement.
Set Method:
_setResource(self, value) - Sets the Resource attrib value of this statement normalizing the path component, removing spurious port numbers (80 for HTTP and 443 for HTTPS) and converting the host component to lower case.

decision

Authorization decision as a DecisionType instance

Get Method:
_getDecision(self) - Gets the decision of the authorization request.
Set Method:
_setDecision(self, value) - Sets the decision of the authorization request.

actions

The actions for which authorisation is requested

Get Method:
unreachable.actions(self) - The actions for which authorisation is requested
Type:
TypedList

evidence

A set of assertions which the Authority may use to base its authorisation decision on

Get Method:
_getEvidence(self) - Gets the Evidence of this statement.
Set Method:
_setEvidence(self, value) - Sets the Evidence of this statement.