Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
9ef6777c
Commit
9ef6777c
authored
Jul 14, 2020
by
ls1947
Browse files
text and optics
parent
a805f41b
Changes
4
Hide whitespace changes
Inline
Side-by-side
bwreg-webapp/src/main/java/edu/kit/scc/webreg/bean/TwoFaUserBean.java
View file @
9ef6777c
...
...
@@ -11,6 +11,7 @@
package
edu.kit.scc.webreg.bean
;
import
java.io.Serializable
;
import
java.time.Instant
;
import
javax.faces.bean.ManagedBean
;
import
javax.faces.bean.ViewScoped
;
...
...
@@ -121,6 +122,10 @@ public class TwoFaUserBean implements Serializable {
if
(
response
.
getResult
()
!=
null
&&
response
.
getResult
().
isStatus
()
&&
response
.
getResult
().
isValue
())
{
// success, Token stays active
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();"
);
createTokenResponse
=
null
;
totpCode
=
""
;
...
...
bwreg-webapp/src/main/resources/msg/messages_de.properties
View file @
9ef6777c
my_twofa
=
Zweite Faktoren
twofa_tokentype
=
Toketyp
twofa_serial
=
Serial
twofa_active
=
Aktiv
twofa_tokentype_totp_hardware
=
Hardware TOTP
twofa_tokentype_yubikey
=
Yubikey
...
...
bwreg-webapp/src/main/resources/msg/messages_en.properties
View file @
9ef6777c
my_twofa
=
Second factors
twofa_tokentype
=
Tokentype
twofa_serial
=
Serial
twofa_active
=
Active
twofa_tokentype_totp_hardware
=
Hardware TOTP
twofa_tokentype_yubikey
=
Yubikey
...
...
bwreg-webapp/src/main/webapp/user/twofa.xhtml
View file @
9ef6777c
...
...
@@ -103,7 +103,7 @@
<p:panel
id=
"totpResponsePanel"
>
<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}"
>
<div>
<h:outputText
value=
"#{twoFaUserBean.createTokenResponse.detail.googleurl.img}"
escape=
"false"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment