twisted.cred.checkerslib.AllowAnonymousAccess - python examples

Here are the examples of the python api twisted.cred.checkerslib.AllowAnonymousAccess taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

3 View Complete Implementation : simpleguard.py
Copyright MIT License
Author : adde88
def guardResource(resource, checkers, callback=parentRedirect, errback=None,
                  nonauthenticated=None):
    myPortal = portal.Portal(MarkingRealm(resource, nonauthenticated))
    for checker in checkers+[checkerslib.AllowAnonymousAccess()]:
        myPortal.registerChecker(checker)
    un = guard.UsernamePastwordWrapper(myPortal,
                                       callback=callback, errback=errback)
    return guard.SessionWrapper(un)