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

Class Action

source code


SAML 2.0 Core Action

Instance Methods [hide private]
 
__init__(self, **kw)
Create an authorization action type
source code
dict
__getstate__(self)
Enable pickling
source code
dict
_getActionTypes(self)
Get action namespace to action types map
source code
 
_setActionTypes(self, value)
Set action namespace to action types map
source code
basestring
_getNamespace(self)
Get the namespace of the action
source code
 
_setNamespace(self, value)
Set the namespace of the action
source code
basestring or int
_getValue(self)
Get the URI of the action to be performed.
source code
 
_setValue(self, value)
Set the URI of the action to be performed.
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 = 'Action'
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 = 'ActionType'
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 NAMESPACE_ATTRIB_NAME = 'Namespace'
Name of the Namespace attribute.
string RWEDC_NS_URI = 'urn:oasis:names:tc:SAML:1.0:action:rwedc'
Read/Write/Execute/Delete/Control action namespace.
string RWEDC_NEGATION_NS_URI = 'urn:oasis:names:tc:SAML:1.0:action:rw...
Read/Write/Execute/Delete/Control negation action namespace.
string GHPP_NS_URI = 'urn:oasis:names:tc:SAML:1.0:action:ghpp'
Get/Head/Put/Post action namespace.
string UNIX_NS_URI = 'urn:oasis:names:tc:SAML:1.0:action:unix'
UNIX file permission action namespace.
tuple ACTION_NS_IDENTIFIERS = ('urn:oasis:names:tc:SAML:1.0:action:r...
Action namespace identifiers
string READ_ACTION = 'Read'
Read action.
string WRITE_ACTION = 'Write'
Write action.
string EXECUTE_ACTION = 'Execute'
Execute action.
string DELETE_ACTION = 'Delete'
Delete action.
string CONTROL_ACTION = 'Control'
Control action.
string NEG_READ_ACTION = '~Read'
Negated Read action.
string NEG_WRITE_ACTION = '~Write'
Negated Write action.
string NEG_EXECUTE_ACTION = '~Execute'
Negated Execute action.
string NEG_DELETE_ACTION = '~Delete'
Negated Delete action.
string NEG_CONTROL_ACTION = '~Control'
Negated Control action.
string HTTP_GET_ACTION = 'GET'
HTTP GET action.
string HTTP_HEAD_ACTION = 'HEAD'
HTTP HEAD action.
string HTTP_PUT_ACTION = 'PUT'
HTTP PUT action.
string HTTP_POST_ACTION = 'POST'
HTTP POST action.
dict ACTION_TYPES = {'urn:oasis:names:tc:SAML:1.0:action:ghpp': ('G...
Recognised action URI to action types mapping
Instance Variables [hide private]
dict __actionTypes
valid action types for each of a given set of action namespaces
string __namespace
action namespace
string __value
action type value
Properties [hide private]
  actionTypes
Restrict vocabulary of action types
  namespace
Action Namespace
  value
Action string

Inherited from common.SAMLObject: qname

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kw)
(Constructor)

source code 

Create an authorization action type

Parameters:
  • namespaceURI - the namespace the element is in
  • elementLocalName - the local name of the XML element this Object represents, defaults to DEFAULT_ELEMENT_LOCAL_NAME. Ensure that this is set to a valid string in derived classes rather the None base class setting
  • namespacePrefix - the prefix for the given namespace
Overrides: object.__init__

__getstate__(self)

source code 

Enable pickling

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

_getActionTypes(self)

source code 

Get action namespace to action types map

Returns: dict
action types map

_setActionTypes(self, value)

source code 

Set action namespace to action types map

Parameters:
  • value (dict) - action types map
Raises:
  • TypeError - incorrect type for input value

_getNamespace(self)

source code 

Get the namespace of the action

Returns: basestring
the namespace of the action

_setNamespace(self, value)

source code 

Set the namespace of the action

Parameters:
  • value (basestring) - the namespace of the action

_getValue(self)

source code 

Get the URI of the action to be performed.

Returns: basestring or int
the URI of the action to be performed

_setValue(self, value)

source code 

Set the URI of the action to be performed.

Parameters:
  • value (basestring or int) - the URI of the value to be performed
Raises:
  • TypeError - incorrect type for input value

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)

RWEDC_NEGATION_NS_URI

Read/Write/Execute/Delete/Control negation action namespace.
Type:
string
Value:
'urn:oasis:names:tc:SAML:1.0:action:rwedc-negation'

ACTION_NS_IDENTIFIERS

Action namespace identifiers
Type:
tuple
Value:
('urn:oasis:names:tc:SAML:1.0:action:rwedc',
 'urn:oasis:names:tc:SAML:1.0:action:rwedc-negation',
 'urn:oasis:names:tc:SAML:1.0:action:ghpp',
 'urn:oasis:names:tc:SAML:1.0:action:unix')

ACTION_TYPES

Recognised action URI to action types mapping
Type:
dict
Value:
{'urn:oasis:names:tc:SAML:1.0:action:ghpp': ('GET',
                                             'HEAD',
                                             'PUT',
                                             'POST'),
 'urn:oasis:names:tc:SAML:1.0:action:rwedc': ('Read',
                                              'Write',
                                              'Execute',
                                              'Delete',
...

Property Details [hide private]

actionTypes

Restrict vocabulary of action types

Get Method:
_getActionTypes(self) - Get action namespace to action types map
Set Method:
_setActionTypes(self, value) - Set action namespace to action types map

namespace

Action Namespace

Get Method:
_getNamespace(self) - Get the namespace of the action
Set Method:
_setNamespace(self, value) - Set the namespace of the action

value

Action string

Get Method:
_getValue(self) - Get the URI of the action to be performed.
Set Method:
_setValue(self, value) - Set the URI of the action to be performed.