token-validator: add email bonus challenge

This commit is contained in:
nemunaire 2020-02-28 13:22:31 +01:00
parent 0302d30390
commit 6086b82181
2 changed files with 15 additions and 4 deletions

View File

@ -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
func init() {
@ -246,6 +250,12 @@ func init() {
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 */
Challenge{
Accessible: []func(*Student, *http.Request) error{noAccess},

View File

@ -5,10 +5,11 @@ var tuto_progress = [
3: { title: "HTTPS on + time", label: "t3"},
4: { title: "DNS ok", label: "t4"},
5: { title: "On Internet", label: "t5"},
6: { title: "Bonus caché", label: "B?"},
7: { title: "Bonus ICMP", label: "B1"},
8: { title: "Bonus disk", label: "B2"},
9: { title: "Uploaded SSH key", label: "C"},
6: { title: "Bonus caché", label: "b0"},
7: { title: "Bonus ICMP", label: "b1"},
8: { title: "Bonus disk", label: "b2"},
9: { title: "Bonus email", label: "b3"},
10: { title: "Uploaded SSH key", label: "ssh"},
},
{
100: { title: "HTTP", label: "HTTP"},