Example #1
0
Auth::Auth(Wt::WContainerWidget* parent) : Wt::WContainerWidget(parent) {
    wittyPlus::Auth* auth = wittyPlus::Auth::instance();
    Wt::Auth::AuthWidget* widget = new Wt::Auth::AuthWidget(
        *auth->authService(), *auth->users(), *auth->login());
    widget->model()->addPasswordAuth(auth->passwordService());
    widget->setRegistrationEnabled(true);
    widget->processEnvironment();
    addWidget(widget);
}
Example #2
0
Wt::Auth::AuthWidget* Auth::NewAuthWidget( void ) {
    
  Wt::Auth::AuthWidget* authWidget
    = new Wt::Auth::AuthWidget(UserAuth::auth(), m_pUserAuth->Users(), m_pUserAuth->login() );

  authWidget->model()->addPasswordAuth(&UserAuth::passwordAuth());
  authWidget->model()->addOAuth(UserAuth::oAuth());
  authWidget->setRegistrationEnabled(true);

  authWidget->processEnvironment();

  return authWidget;  
}