Ignore:
Timestamp:
24/04/09 10:25:49 (11 years ago)
Author:
pjkersha
Message:

Updates following initial release on ndg3beta - release is now 1.0.1rc1:

  • Added additional test authN interface class for OpenID Provider BasicSessionManagerOpenIDAuthNInterface. This links to a session manager for authN but uses a simple look-up in the ini file to resolve usernames to OpenID identifiers. This is useful for testing. The production version SessionManagerOpenIDAuthNInterface uses a table in a database to do the same function.
  • improved ndg.security.server.wsgi.authn.AuthenticationRedirectMiddleware? log messaging for checker intercept method.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/openid/provider/authninterface/basic.py

    r5222 r5223  
    139139        @raise AuthNInterfaceConfigError: error with configuration 
    140140        """ 
    141         super(BasicSessionManagerOpenIDAuthNInterface, self).__init__(**prop) 
    142          
    143         # Filter out BasicAuthNInterface properties ready for call to Session 
    144         # Manager client 
    145         for p in prop.keys(): 
    146             if p in BasicAuthNInterface.propertyKeyNames: 
    147                 prop.pop(p) 
     141        user2Identifier = prop.pop('username2UserIdentifiers') 
     142        if user2Identifier: 
     143            self._username2Identifier = {} 
     144            for i in user2Identifier.split(): 
     145                username, identifierStr = i.strip().split(':') 
     146                identifiers = tuple(identifierStr.split(',')) 
     147                self._username2Identifier[username] = identifiers 
     148        else: 
     149            raise AuthNInterfaceConfigError('No "user2Identifier" config ' 
     150                                            'option found') 
    148151 
    149152        self._client = WSGISessionManagerClient(**prop) 
Note: See TracChangeset for help on using the changeset viewer.