#!/usr/bin/env pluginwrapper3
from safeguard.sessions.plugin import AAResponse
class Plugin:
def authenticate(self, gateway_user):
if is_on_whitelist(gateway_user):
return AAResponse.accept()
elif is_on_blacklist(gateway_user):
return AAResponse.deny()
else:
return AAResponse.need_info("Who are you?", 'username')