Package AccessGrid :: Package Security :: Module Subject :: Class Subject
[show private | hide private]
[frames | no frames]

Class Subject

Known Subclasses:
X509Subject

A Subject is an instance of a credential used by an AG User.

A Subject can be identified by various authentication mechanisms. we currently support X509 certificates (per Globus).
Method Summary
  __init__(self, name, auth_type, auth_data, id)
  __cmp__(self, other)
Comparison operator, so two subjects can be compared.
  __hash__(self)
A hash method so subjects can be used as dictionary keys.
  __str__(self)
This method converts the subject to a string.
  _repr_(self)
This method creates an XML representation of the subject.
  GetAuthenticationData(self)
This accessory returns the authentication data.
  GetAuthenticationType(self)
This accessor returns the authentication type.
  GetName(self)
This accessor returns the subject name.
  GetSubject(self)
This returns a tuple containing the subject data, this is probably for legacy use.
  ToXML(self, doc)
This method extends the specified doc object with an xml representation of this subject.

Method Details

__init__(self, name, auth_type, auth_data=None, id='0000010342a6a9e0008c00dd00220047859')
(Constructor)

Parameters:
name - the name of the subject
           (type=string)
auth_type - the type of authentication used for the subject
           (type=string)
auth_data - opaque authentication specific data
           (type=string)
id - a globally unique identifier for this object
           (type=a string containing a globally unique identifier)

__cmp__(self, other)
(Comparison operator)

Comparison operator, so two subjects can be compared.

This method compares this subject with the one specified. If they match it returns one otherwise it returns 0.
Parameters:
other - the subject to compare this one with
           (type=AccessGrid.Security.Subject)
Returns:
1 if they match, 0 otherwise.
Raises:
SubjectTypesDifferent - if subject types don't match.

__hash__(self)
(Hashing function)

A hash method so subjects can be used as dictionary keys.
Returns:
the id attribute which is a globally unique identifier in a string.

__str__(self)
(Informal representation operator)

This method converts the subject to a string.
Returns:
string

_repr_(self)

This method creates an XML representation of the subject.
Returns:
a string containing the XML representation of the subject.

GetAuthenticationData(self)

This accessory returns the authentication data.
Returns:
the authentication data

GetAuthenticationType(self)

This accessor returns the authentication type.
Returns:
the authentication type as a string.

GetName(self)

This accessor returns the subject name.
Returns:
the name as a string

GetSubject(self)

This returns a tuple containing the subject data, this is probably for legacy use.
Returns:
a tuple that represents this subject.

ToXML(self, doc)

This method extends the specified doc object with an xml representation of this subject.
Parameters:
doc - a DOM document to add this object to
           (type=xml.dom.minidom document)
Returns:
a the new

Generated by Epydoc 2.1 on Thu Apr 14 16:39:28 2005 http://epydoc.sf.net