Source File
auth.go
Belonging Package
golang.org/x/pkgsite/internal/auth
package auth
import (
)
const (
mainClientID = "117187402928-nl3u0qo5l2c2hhsuf2qj8irsfb3l6hfc.apps.googleusercontent.com"
expClientID = "55665122702-tk2rogkaalgru7pqibvbltqs7geev8j5.apps.googleusercontent.com"
)
, := http.NewRequest("GET", "http://localhost", nil)
if != nil {
return "", fmt.Errorf("http.NewRequest(): %v", )
}
.SetAuthHeader()
return .Header.Get("Authorization"), nil
}
func ( []byte, bool) (string, []idtoken.ClientOption) {
var []idtoken.ClientOption
if len() > 0 {
= append(, idtoken.WithCredentialsJSON())
}
:= mainClientID
if {
= expClientID
}
return ,
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |