#
# get.py
# Account portal & service interface
#
class GET_mixin(object):
# Top level
#
# We don't use chore-level authentication, as we're the
# ones who will deal with authentication in the first place.
#
................................................................................
# we either display the portal (if they pointed their own
# browser at us) or else generate a redir to the service which
# kicked them over here to get (re-)authentcated.
#
# If there's no cookie, or not a good one, let them enter
# it here and we'll deal with authentication.
def send_top(self):
res = self.auth_cookie()
# If they're OK...
if res is True:
# Show the service portal return self.send_portal()
# TBD, redirect back. But have to be really careful
# about validating destination; we don't want to send
# them anywhere but our own services.
# Show portal of services
def send_portal(self):
app = self.server.approot
buf = self.build_header("Service Portal")
buf += "<h3>Choose a service:</h3><br>\n"
for account in app.config.get("account", ()): import pdb pdb.set_trace()