package internal
import "cloud.google.com/go/auth/internal"
Index ¶
- Constants
- func CloneDefaultClient() *http.Client
- func GetProjectID(b []byte, override string) string
- func GetQuotaProject(b []byte, override string) string
- func ParseKey(key []byte) (*rsa.PrivateKey, error)
- func ReadAll(r io.Reader) ([]byte, error)
Constants ¶
const ( // TokenTypeBearer is the auth header prefix for bearer tokens. TokenTypeBearer = "Bearer" )
Functions ¶
func CloneDefaultClient ¶
CloneDefaultClient returns a http.Client with some good defaults.
func GetProjectID ¶
GetProjectID retrieves project with precedence being: override, environment variable, creds json file.
func GetQuotaProject ¶
GetQuotaProject retrieves quota project with precedence being: override, environment variable, creds json file.
func ParseKey ¶
func ParseKey(key []byte) (*rsa.PrivateKey, error)
ParseKey converts the binary contents of a private key file to an *rsa.PrivateKey. It detects whether the private key is in a PEM container or not. If so, it extracts the the private key from PEM container before conversion. It only supports PEM containers with no passphrase.
func ReadAll ¶
ReadAll consumes the whole reader and safely reads the content of its body with some overflow protection.
Source Files ¶
internal.go
Directories ¶
| Path | Synopsis |
|---|---|
| internal/internaldetect | Package internaldetect is meant to hide implementation details from the pubic surface of the detect package. |
| internal/jwt | |
| internal/testutil | |
| internal/testutil/testdns | Package testdns is a light DNS client used for testings to avoid pulling in dependencies. |
| internal/testutil/testgcs | Package testgcs is a light GCS client used for testings to avoid pulling in dependencies. |
| internal/transport | Package transport provided internal helpers for the two transport packages (grpctransport and httptransport). |
| internal/transport/cert | |
| internal/transport/cert/cmd | test_signer.go is a net/rpc server that listens on stdin/stdout, exposing mock methods for testing enterprise certificate proxy flow. |
- Version
- v0.1.1
- Published
- Mar 11, 2024
- Platform
- darwin/amd64
- Imports
- 10 packages
- Last checked
- 5 seconds ago –
Tools for package owners.