Update photon controller go SDK in vendor code.

This commit is contained in:
Miao Luo
2017-03-14 15:48:02 -07:00
parent 442e920085
commit 1439ea2bba
34 changed files with 1536 additions and 393 deletions

View File

@@ -18,6 +18,7 @@ import (
"io/ioutil"
"log"
"net/http"
"net/url"
"strings"
)
@@ -168,6 +169,8 @@ type OIDCTokenResponse struct {
}
func (client *OIDCClient) GetTokenByPasswordGrant(username string, password string) (tokens *OIDCTokenResponse, err error) {
username = url.QueryEscape(username)
password = url.QueryEscape(password)
body := fmt.Sprintf(passwordGrantFormatString, username, password, client.Options.TokenScope)
return client.getToken(body)
}