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.
  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='00000108b09f334c008c00dd0022006d130')
(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.

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 Mon Jan 09 13:23:51 2006 http://epydoc.sf.net