token-validator: add email bonus challenge
This commit is contained in:
parent
0302d30390
commit
6086b82181
2 changed files with 15 additions and 4 deletions
|
@ -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},
|
||||
|
|
Reference in a new issue