google oauth working along with clean up

cleaned up some things from starz that weren't needed any more.  Also
cleaned up the oauth process and now am storing the users emai but also
have the userInfo struct that gathers all the info that google oauth
userinfo returns
This commit is contained in:
dm
2016-08-22 13:03:23 -07:00
parent 901d8e5070
commit 4f7b61cb86
3 changed files with 282 additions and 271 deletions
+1 -13
View File
@@ -21,7 +21,6 @@ type Config struct {
Port int
ClientID string
ClientSecret string
ApiToken string
CookieSecret string
}
@@ -30,7 +29,7 @@ func init() {
}
func main() {
var host, clientId, clientSecret, apiToken, cookieSecret string
var host, clientId, clientSecret, cookieSecret string
var port int
var run = &cobra.Command{
@@ -59,9 +58,6 @@ func main() {
if clientSecret != "" {
config.ClientSecret = clientSecret
}
if apiToken != "" {
config.ApiToken = apiToken
}
if cookieSecret != "" {
config.CookieSecret = cookieSecret
} else {
@@ -88,7 +84,6 @@ func main() {
sm,
config.ClientID,
config.ClientSecret,
config.ApiToken,
config.CookieSecret,
"",
)
@@ -146,13 +141,6 @@ func main() {
"",
"cookieSecret",
)
run.Flags().StringVarP(
&apiToken,
"apitoken",
"a",
"",
"github apitoken",
)
var rootCmd = &cobra.Command{Use: "app"}
rootCmd.AddCommand(run)