Created
March 15, 2019 17:23
-
-
Save jaredlockhart/dcf99e96e8f18bcc3c8af31f2ab81ebf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AuthenticationDelegator(object): | |
def __init__(self, auth_middlewares): | |
self.auth_middlewares = auth_middlewares | |
def process_request(self, request): | |
for middlware in self.auth_middlewares: | |
try: | |
return middleware.process_request(request): | |
except RequestRejected, e: | |
continue | |
raise RequestRejected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment