From 92145684d717b7263196bc7692f86ba0e38c0662 Mon Sep 17 00:00:00 2001 From: iyear Date: Fri, 27 Mar 2020 21:45:36 +0800 Subject: [PATCH] Update --- outlook.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/outlook.go b/outlook.go index 30f5067..f0fc2a2 100644 --- a/outlook.go +++ b/outlook.go @@ -17,6 +17,7 @@ const ( var ( cliid string rediuri string + scope string ) func init() { @@ -28,12 +29,15 @@ func init() { } cliid = viper.GetString("client_id") rediuri = viper.GetString("redirect_uri") + scope = viper.GetString("scope") //refreshtoken := "xxxx" //fmt.Println(MSGetUserInfo(MSGetToken(refreshtoken,"user.read mail.read"))) + //code := "xxx" + //fmt.Println(MSFirGetToken(code)) } //return access_token and refresh_token -func MSFirGetToken(code, scope string) (access string, refresh string) { +func MSFirGetToken(code string) (access string, refresh string) { var r http.Request client := &http.Client{} r.ParseForm() @@ -59,7 +63,7 @@ func MSFirGetToken(code, scope string) (access string, refresh string) { } //return access_token -func MSGetToken(refreshtoken, scope string) (access string) { +func MSGetToken(refreshtoken string) (access string) { var r http.Request client := &http.Client{} r.ParseForm()