Commit 9ef6777c authored by ls1947's avatar ls1947
Browse files

text and optics

parent a805f41b
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
package edu.kit.scc.webreg.bean; package edu.kit.scc.webreg.bean;
import java.io.Serializable; import java.io.Serializable;
import java.time.Instant;
import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped; import javax.faces.bean.ViewScoped;
...@@ -121,6 +122,10 @@ public class TwoFaUserBean implements Serializable { ...@@ -121,6 +122,10 @@ public class TwoFaUserBean implements Serializable {
if (response.getResult() != null && response.getResult().isStatus() && response.getResult().isValue()) { if (response.getResult() != null && response.getResult().isStatus() && response.getResult().isValue()) {
// success, Token stays active // success, Token stays active
tokenList = twoFaService.findByUserId(sessionManager.getUserId()); tokenList = twoFaService.findByUserId(sessionManager.getUserId());
if (tokenList.size() == 1) {
// this was the first token. We have to set 2fa elevation
sessionManager.setTwoFaElevation(Instant.now());
}
PrimeFaces.current().executeScript("PF('addTotpDlg').hide();"); PrimeFaces.current().executeScript("PF('addTotpDlg').hide();");
createTokenResponse = null; createTokenResponse = null;
totpCode = ""; totpCode = "";
......
my_twofa=Zweite Faktoren my_twofa=Zweite Faktoren
twofa_tokentype=Toketyp twofa_tokentype=Toketyp
twofa_serial=Serial
twofa_active=Aktiv twofa_active=Aktiv
twofa_tokentype_totp_hardware=Hardware TOTP twofa_tokentype_totp_hardware=Hardware TOTP
twofa_tokentype_yubikey=Yubikey twofa_tokentype_yubikey=Yubikey
......
my_twofa=Second factors my_twofa=Second factors
twofa_tokentype=Tokentype twofa_tokentype=Tokentype
twofa_serial=Serial
twofa_active=Active twofa_active=Active
twofa_tokentype_totp_hardware=Hardware TOTP twofa_tokentype_totp_hardware=Hardware TOTP
twofa_tokentype_yubikey=Yubikey twofa_tokentype_yubikey=Yubikey
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<p:panel id="totpResponsePanel"> <p:panel id="totpResponsePanel">
<p:commandButton id="totpStartButton" action="#{twoFaUserBean.createAuthenticatorToken()}" value="#{messages.start}" <p:commandButton id="totpStartButton" action="#{twoFaUserBean.createAuthenticatorToken()}" value="#{messages.start}"
update="totpResponsePanel" rendered="#{empty twoFaUserBean.createTokenResponse}"/> update="totpResponsePanel" oncomplete="PF('addTotpDlg').initPosition()" rendered="#{empty twoFaUserBean.createTokenResponse}"/>
<h:panelGroup rendered="#{not empty twoFaUserBean.createTokenResponse}"> <h:panelGroup rendered="#{not empty twoFaUserBean.createTokenResponse}">
<div> <div>
<h:outputText value="#{twoFaUserBean.createTokenResponse.detail.googleurl.img}" escape="false" /> <h:outputText value="#{twoFaUserBean.createTokenResponse.detail.googleurl.img}" escape="false" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment