Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(tokenProvider TokenProvider) httpclient.Middleware
Types ¶
type Config ¶
type Config struct { RoutePath string RouteMethod string DataSourceID int64 DataSourceUpdated time.Time Scopes []string // JwtTokenConfig is only used for JWT tokens JwtTokenConfig *JwtTokenConfig }
Config is the configuration for getting a TokenProvider.
type JwtTokenConfig ¶
JwtTokenConfig is the configuration for using JWT to fetch tokens.
type TokenProvider ¶
TokenProvider is anything that can return a token
func NewGceAccessTokenProvider ¶
func NewGceAccessTokenProvider(cfg Config) TokenProvider
NewGceAccessTokenProvider returns a token provider for gce authentication
func NewJwtAccessTokenProvider ¶
func NewJwtAccessTokenProvider(cfg Config) TokenProvider
NewJwtAccessTokenProvider returns a token provider for jwt file authentication
Click to show internal directories.
Click to hide internal directories.