Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
5c9c7779
Commit
5c9c7779
authored
Jul 23, 2014
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oath: add 'step' and 'digits' options
parent
b913fbd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
AuthEdit.js
www/manager/dc/AuthEdit.js
+42
-0
No files found.
www/manager/dc/AuthEdit.js
View file @
5c9c7779
...
...
@@ -133,6 +133,8 @@ Ext.define('PVE.dc.AuthEdit', {
if
(
!
me
.
rendered
)
{
return
;
}
me
.
down
(
'
field[name=oath_step]
'
).
setVisible
(
value
===
'
oath
'
);
me
.
down
(
'
field[name=oath_digits]
'
).
setVisible
(
value
===
'
oath
'
);
me
.
down
(
'
field[name=yubico_api_id]
'
).
setVisible
(
value
===
'
yubico
'
);
me
.
down
(
'
field[name=yubico_api_key]
'
).
setVisible
(
value
===
'
yubico
'
);
me
.
down
(
'
field[name=yubico_url]
'
).
setVisible
(
value
===
'
yubico
'
);
...
...
@@ -140,6 +142,35 @@ Ext.define('PVE.dc.AuthEdit', {
}
});
column2
.
push
({
xtype
:
'
numberfield
'
,
name
:
'
oath_step
'
,
value
:
''
,
minValue
:
10
,
step
:
1
,
allowDecimals
:
false
,
allowBlank
:
true
,
emptyText
:
PVE
.
Utils
.
defaultText
+
'
(30)
'
,
submitEmptyText
:
false
,
hidden
:
true
,
fieldLabel
:
'
OATH time step
'
});
column2
.
push
({
xtype
:
'
numberfield
'
,
name
:
'
oath_digits
'
,
value
:
''
,
minValue
:
6
,
maxValue
:
8
,
step
:
1
,
allowDecimals
:
false
,
allowBlank
:
true
,
emptyText
:
PVE
.
Utils
.
defaultText
+
'
(6)
'
,
submitEmptyText
:
false
,
hidden
:
true
,
fieldLabel
:
'
OATH password length
'
});
column2
.
push
({
xtype
:
'
textfield
'
,
name
:
'
yubico_api_id
'
,
...
...
@@ -183,6 +214,12 @@ Ext.define('PVE.dc.AuthEdit', {
if
(
values
.
tfa
===
'
oath
'
)
{
values
.
tfa
=
"
type=oath
"
;
if
(
values
.
oath_step
)
{
values
.
tfa
+=
"
,step=
"
+
values
.
oath_step
;
}
if
(
values
.
oath_digits
)
{
values
.
tfa
+=
"
,digits=
"
+
values
.
oath_digits
;
}
}
else
if
(
values
.
tfa
===
'
yubico
'
)
{
values
.
tfa
=
"
type=yubico
"
;
values
.
tfa
+=
"
,id=
"
+
values
.
yubico_api_id
;
...
...
@@ -194,6 +231,8 @@ Ext.define('PVE.dc.AuthEdit', {
delete
values
.
tfa
;
}
delete
values
.
oath_step
;
delete
values
.
oath_digits
;
delete
values
.
yubico_api_id
;
delete
values
.
yubico_api_key
;
delete
values
.
yubico_url
;
...
...
@@ -230,6 +269,9 @@ Ext.define('PVE.dc.AuthEdit', {
data
.
yubico_api_key
=
tfacfg
.
key
;
data
.
yubico_api_id
=
tfacfg
.
id
;
data
.
yubico_url
=
tfacfg
.
url
;
}
else
if
(
tfacfg
.
type
===
'
oath
'
)
{
data
.
oath_step
=
tfacfg
.
step
;
data
.
oath_digits
=
tfacfg
.
digits
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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