token-validator: add email bonus challenge
This commit is contained in:
parent
0302d30390
commit
6086b82181
@ -194,6 +194,10 @@ func challengeDisk(s *Student, t *givenToken, chid int) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func challengeEMail(s *Student, t *givenToken, chid int) error {
|
||||||
|
return errors.New("This is not the expected token.")
|
||||||
|
}
|
||||||
|
|
||||||
var challenges []Challenge
|
var challenges []Challenge
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -246,6 +250,12 @@ func init() {
|
|||||||
Check: challengeDisk,
|
Check: challengeDisk,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* Bonus 3 : mail */
|
||||||
|
Challenge{
|
||||||
|
Accessible: []func(*Student, *http.Request) error{noAccessRestriction},
|
||||||
|
Check: challengeEMail,
|
||||||
|
},
|
||||||
|
|
||||||
/* Last : SSH key, see ssh.go:156 in NewKey function */
|
/* Last : SSH key, see ssh.go:156 in NewKey function */
|
||||||
Challenge{
|
Challenge{
|
||||||
Accessible: []func(*Student, *http.Request) error{noAccess},
|
Accessible: []func(*Student, *http.Request) error{noAccess},
|
||||||
|
@ -5,10 +5,11 @@ var tuto_progress = [
|
|||||||
3: { title: "HTTPS on + time", label: "t3"},
|
3: { title: "HTTPS on + time", label: "t3"},
|
||||||
4: { title: "DNS ok", label: "t4"},
|
4: { title: "DNS ok", label: "t4"},
|
||||||
5: { title: "On Internet", label: "t5"},
|
5: { title: "On Internet", label: "t5"},
|
||||||
6: { title: "Bonus caché", label: "B?"},
|
6: { title: "Bonus caché", label: "b0"},
|
||||||
7: { title: "Bonus ICMP", label: "B1"},
|
7: { title: "Bonus ICMP", label: "b1"},
|
||||||
8: { title: "Bonus disk", label: "B2"},
|
8: { title: "Bonus disk", label: "b2"},
|
||||||
9: { title: "Uploaded SSH key", label: "C"},
|
9: { title: "Bonus email", label: "b3"},
|
||||||
|
10: { title: "Uploaded SSH key", label: "ssh"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
100: { title: "HTTP", label: "HTTP"},
|
100: { title: "HTTP", label: "HTTP"},
|
||||||
|
Reference in New Issue
Block a user