Low Activity

Commits : Individual Commit

  Analyzed 2 days ago based on code collected 2 days ago.

Commit ID d8113184cfe4904bf9b6a7db42aab9f749a16344

Anon80 Contributor: Mikaƫl Ates Files Modified: 29
Date: 12-October-2011 at 09:21 Lines Added: 8225
Repository: http://dev.entrouvert.org/git/authentic.git/ master Lines Removed: 0
Commit Comment: [idp] Add attribute aggregator application
Intro
-----

Attribute aggregator provides a main Model class called UserAttributeProfile,
functions to load attributes and extract attributes.

The mapping between attribute namespaces is built-in and depends on a unique
file (mapping.py).

A main schema is defined and is based on LDAP/X500 for naming. The support
of http://schemas.xmlsoap.org/ws/2005/05/identity/claims is partly complete.

Source of attributes are connected with attribute loading functions using
signals.

FAQ
---

Why not use the Django User profile?

The django user profile needs to define attributes as class attributes and then
support form filling or mapping with LDAP.

That is useful and may be used, especially because the profile can be used as a
source of attribute to load in the attribute_aggregator profile.

The attribute_aggregator profile allow to load multivalued attributes from any
source supported (LDAP, Django profile and attributes in Django session for now)
from any namespace defined in mapping.py (LDAP/X500 and claims for now).

The profile can be loaded giving a source or a list of attribute, or can be
from any known source, or with a dictionnary.

Attributes can be extracted with many functions in any namespace supported.

Quick explanation
-----------------

The schema is defined in mapping and is made of definitions like this:

"sn": {
"oid": "2.5.4.4",
"display_name": _("sn surname"),
"alias": ['surname'],
"profile_field_name": 'last_name',
"type": "http://www.w3.org/2001/XMLSchema#string",
"namespaces": {
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims": {
"identifiers":
[
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
],
"friendly_names":
[
"Last Name",
],
}
}
},

The profile store all the data in a text field taht contains a cPickle list of
instances of the class AttributeData.

The profile is attached to a user and then can be created or loaded with

profile = load_or_create_user_profile(user=user)

User may be None to create a temporary profile for an anonymous user. But
that need a DB cleaning function not implemented.

The AttributeData instances have a field expiration_data. It the profile exists,
obsolete data are removed at loading.
 

Changes by Language

Language Code Added Code Removed Comments Added Comment Removed Blanks Added Blanks Removed
  Python 4458 0 1351 0 802 0
  C 1396 0 54 0 164 0

Changes by File

Showing page 1 of 3
File Language Code Added Code Removed Comments Added Comment Removed Blanks Added Blanks Removed
authentic2/attribute_aggregator/core.py Python 253 0 32 0 55 0
authentic2/attribute_aggregator/__init__.py   No source code was detected in this file.
...ic2/attribute_aggregator/ldap_sources.py Python 121 0 53 0 20 0
...ibute_aggregator/ldifs/60supann.ldif.txt   No source code was detected in this file.
...ttribute_aggregator/ldifs/educourse.ldif   No source code was detected in this file.
...ttribute_aggregator/ldifs/edumember.ldif   No source code was detected in this file.
...2/attribute_aggregator/ldifs/eduorg.ldif   No source code was detected in this file.
...ic2/attribute_aggregator/ldifs/eduOrg.py Python 30 0 10 0 6 0
...ttribute_aggregator/ldifs/eduperson.ldif   No source code was detected in this file.
.../attribute_aggregator/ldifs/eduPerson.py Python 66 0 22 0 12 0
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.