func LoadToken(path string) (*Token, error) {
	file, err := os.Open(path)
	if err != nil {
		return nil, fmt.Errorf("failed to open file (%s) while loading token: %v", path, err)
	}
	defer file.Close()
	var token Token
	dec := json.NewDecoder(file)
	if err = dec.Decode(&token); err != nil {
		return nil, fmt.Errorf("failed to decode contents of file (%s) into Token representation: %v", path, err)
	}
	return &token, nil
}
LoadToken restores a Token object from a file located at 'path'.
package adal
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
)