Esempio n. 1
0
func cpValidateLogin(creds *login, client *node.ControlClient) bool {
	glog.V(0).Infof("Attempting to validate user %v against the control center api", creds.Username)
	// create a client
	user := userdomain.User{
		Name:     creds.Username,
		Password: creds.Password,
	}
	// call validate token on it
	var result bool
	err := client.ValidateCredentials(user, &result)

	if err != nil {
		glog.Errorf("Unable to validate credentials %s", err)
	}

	return result
}