Search in sources :

Example 1 with SetGoogleAuthenticatorCredentialClickListener

use of com.hack23.cia.web.impl.ui.application.views.pageclicklistener.SetGoogleAuthenticatorCredentialClickListener in project cia by Hack23.

the class UserHomeSecuritySettingsPageModContentFactoryImpl method createEnableGoogleAuthButton.

private static Button createEnableGoogleAuthButton() {
    final Button googleAuthButton = new Button(ENABLE_GOOGLE_AUTHENTICATOR, VaadinIcons.SAFE_LOCK);
    googleAuthButton.setId(ENABLE_GOOGLE_AUTHENTICATOR);
    final SetGoogleAuthenticatorCredentialRequest googleAuthRequest = new SetGoogleAuthenticatorCredentialRequest();
    googleAuthRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
    googleAuthButton.addClickListener(new SetGoogleAuthenticatorCredentialClickListener(googleAuthRequest));
    return googleAuthButton;
}
Also used : Button(com.vaadin.ui.Button) SetGoogleAuthenticatorCredentialRequest(com.hack23.cia.service.api.action.user.SetGoogleAuthenticatorCredentialRequest) SetGoogleAuthenticatorCredentialClickListener(com.hack23.cia.web.impl.ui.application.views.pageclicklistener.SetGoogleAuthenticatorCredentialClickListener)

Aggregations

SetGoogleAuthenticatorCredentialRequest (com.hack23.cia.service.api.action.user.SetGoogleAuthenticatorCredentialRequest)1 SetGoogleAuthenticatorCredentialClickListener (com.hack23.cia.web.impl.ui.application.views.pageclicklistener.SetGoogleAuthenticatorCredentialClickListener)1 Button (com.vaadin.ui.Button)1