Example #1
0
 def unauthorized(self, id, request):
     if not IBrowserRequest.providedBy(request) or request.method == 'PUT':
         next = getNextUtility(self, IAuthentication)
         return next.unauthorized(id, request)
     if str(request.URL).endswith('.ics'):
         # Special case: testing shows that Mozilla Calendar does not send
         # the Authorization header unless challenged.  It is pointless
         # to redirect an iCalendar client to an HTML login form.
         next = getNextUtility(self, IAuthentication)
         return next.unauthorized(id, request)
     return self.authPlugin.unauthorized(id, request)
Example #2
0
    def getPrincipal(self, id):
        """Get principal meta-data.

        Returns principals for groups and persons.
        """
        principal = self.authPlugin.getPrincipal(id)
        if not principal:
            next = getNextUtility(self, IAuthentication)
            principal = next.getPrincipal(id)

        return principal
 def _callFUT(self, *args, **kw):
     from zope.component import getNextUtility
     return getNextUtility(*args, **kw)
Example #4
0
 def _callFUT(self, *args, **kw):
     from zope.component import getNextUtility
     return getNextUtility(*args, **kw)