authenticate.go 360 Bytes
Newer Older
Loïck Bonniot's avatar
Loïck Bonniot committed
1 2 3 4
package main

import (
	"fmt"
5
	"os"
Loïck Bonniot's avatar
Loïck Bonniot committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19

	"dfss/dfssc/user"
)

func authUser() {
	fmt.Println("Authenticating user")
	var mail, token string

	readStringParam("Mail", "", &mail)
	readStringParam("Token", "", &token)

	err := user.Authenticate(fca, fcert, addrPort, mail, token)
	if err != nil {
		fmt.Println("An error occurred : ", err.Error())
20
		os.Exit(3)
Loïck Bonniot's avatar
Loïck Bonniot committed
21 22
	}
}