def middleware(self, app): if is_html(app): cfg = app.config if cfg['LOGIN_URL']: yield Login(cfg['LOGIN_URL']) if cfg['LOGOUT_URL']: yield Logout(cfg['LOGOUT_URL']) if cfg['HTML_AUTH_TOKEN_URL']: yield Token(cfg['HTML_AUTH_TOKEN_URL']) if cfg['REGISTER_URL']: yield SignUp(cfg['REGISTER_URL']) if cfg['RESET_PASSWORD_URL']: yield ForgotPassword(cfg['RESET_PASSWORD_URL'])
def middleware(self, app): # user and organisation plugins in Html mode if is_html(app) and has_plugin(app, 'users'): orgs = has_plugin(app, 'organisations') yield UserSettings('/settings') yield UserView(orgs)