should work with multiple openvpn servers
the goal is to have an udp instance, and a tcp/443 one can handle connected and disconnected messages
This commit is contained in:
8
otp.go
8
otp.go
@@ -13,6 +13,14 @@ func (s *OpenVpnMgt) GenerateOTP(user string) ([]string, error) {
|
||||
// return s.GenerateOTPGeneric(user, 60, "sha256", 30, 8)
|
||||
// }
|
||||
|
||||
func (s *OpenVpnMgt) TokenPassword(c *vpnSession) (bool, string) {
|
||||
//TODO implement that correcly
|
||||
if c.password == "maith1wiePuw3ieb4heiNie5y" {
|
||||
return true, "maith1wiePuw3ieb4heiNie5y"
|
||||
}
|
||||
return false, "maith1wiePuw3ieb4heiNie5y"
|
||||
}
|
||||
|
||||
func (s *OpenVpnMgt) GenerateOTPGeneric(user string, period int, algo string, secretLen int, digits int) ([]string, error) {
|
||||
codes := []string{}
|
||||
now := time.Now()
|
||||
|
||||
Reference in New Issue
Block a user