forked from Mirrors/oauth2
oauth2/google: fixed comment formatting and clarified naming
This commit is contained in:
parent
f46c65f948
commit
6513477b5b
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
// ClientAuthentication represents an OAuth client ID and secret and the mechanism for passing these credentials as stated in rfc6749#2.3.1.
|
// ClientAuthentication represents an OAuth client ID and secret and the mechanism for passing these credentials as stated in rfc6749#2.3.1.
|
||||||
type ClientAuthentication struct {
|
type ClientAuthentication struct {
|
||||||
//AuthStyle can be either basic or request-body
|
// AuthStyle can be either basic or request-body
|
||||||
AuthStyle oauth2.AuthStyle
|
AuthStyle oauth2.AuthStyle
|
||||||
ClientID string
|
ClientID string
|
||||||
ClientSecret string
|
ClientSecret string
|
||||||
|
@ -34,6 +34,4 @@ func (c *ClientAuthentication) InjectAuthentication(values url.Values, headers h
|
||||||
values.Set("client_id", c.ClientID)
|
values.Set("client_id", c.ClientID)
|
||||||
values.Set("client_secret", c.ClientSecret)
|
values.Set("client_secret", c.ClientSecret)
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package externalaccount
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
//Error for handling OAuth related error responses as stated in rfc6749#5.2.
|
// Error for handling OAuth related error responses as stated in rfc6749#5.2.
|
||||||
type Error struct {
|
type Error struct {
|
||||||
Code string
|
Code string
|
||||||
URI string
|
URI string
|
||||||
|
|
|
@ -2,7 +2,7 @@ package externalaccount
|
||||||
|
|
||||||
import "testing"
|
import "testing"
|
||||||
|
|
||||||
func TestError_Generator(t *testing.T) {
|
func TestError(t *testing.T) {
|
||||||
e := Error{
|
e := Error{
|
||||||
"42",
|
"42",
|
||||||
"http:thisIsAPlaceholder",
|
"http:thisIsAPlaceholder",
|
||||||
|
|
Loading…
Reference in New Issue