forked from Mirrors/oauth2
Run go fmt.
This commit is contained in:
parent
7792988ab8
commit
802bddef7c
|
@ -8,10 +8,9 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
|
||||
var clientID = "rbrgnognrhongo3bi4gb9ghg9g"
|
||||
var clientSecret = "notsosecret"
|
||||
var valuesH = url.Values {
|
||||
var valuesH = url.Values{
|
||||
"audience": []string{"32555940559.apps.googleusercontent.com"},
|
||||
"grant_type": []string{"urn:ietf:params:oauth:grant-type:token-exchange"},
|
||||
"requested_token_type": []string{"urn:ietf:params:oauth:token-type:access_token"},
|
||||
|
@ -20,11 +19,11 @@ var valuesH = url.Values {
|
|||
"scope": []string{"https://www.googleapis.com/auth/devstorage.full_control"},
|
||||
}
|
||||
|
||||
var headerH = http.Header {
|
||||
var headerH = http.Header{
|
||||
"Content-Type": []string{"application/x-www-form-urlencoded"},
|
||||
}
|
||||
|
||||
var valuesP = url.Values {
|
||||
var valuesP = url.Values{
|
||||
"audience": []string{"32555940559.apps.googleusercontent.com"},
|
||||
"grant_type": []string{"urn:ietf:params:oauth:grant-type:token-exchange"},
|
||||
"requested_token_type": []string{"urn:ietf:params:oauth:token-type:access_token"},
|
||||
|
@ -33,7 +32,7 @@ var valuesP = url.Values {
|
|||
"scope": []string{"https://www.googleapis.com/auth/devstorage.full_control"},
|
||||
}
|
||||
|
||||
var headerP = http.Header {
|
||||
var headerP = http.Header{
|
||||
"Content-Type": []string{"application/x-www-form-urlencoded"},
|
||||
}
|
||||
|
||||
|
@ -63,7 +62,7 @@ func TestClientAuthentication_InjectHeaderAuthentication(t *testing.T) {
|
|||
if got, want := valuesH["scope"], []string{"https://www.googleapis.com/auth/devstorage.full_control"}; !reflect.DeepEqual(got, want) {
|
||||
t.Errorf("scope = %q, want %q", got, want)
|
||||
}
|
||||
if got, want := headerH["Authorization"],[]string{"Basic cmJyZ25vZ25yaG9uZ28zYmk0Z2I5Z2hnOWc6bm90c29zZWNyZXQ="}; !reflect.DeepEqual(got, want) {
|
||||
if got, want := headerH["Authorization"], []string{"Basic cmJyZ25vZ25yaG9uZ28zYmk0Z2I5Z2hnOWc6bm90c29zZWNyZXQ="}; !reflect.DeepEqual(got, want) {
|
||||
t.Errorf("Authorization in header = %q, want %q", got, want)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue