Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIDTokenWithServiceAccount ¶
GetIDTokenWithServiceAccount gets an IAP ID Token required for authenticating a service account with IAP. For more info, see https://cloud.google.com/iap/docs/authentication-howto#authenticating_from_a_service_account
func GetIapToken ¶
returns the token get from google for IAP
func RequestIapIDToken ¶
func RequestIapIDToken(token string, clientId string, clientSecret string, iapClientId string) (string, error)
RequestIapIDToken implements the audience parameter required for accessing IAP, see for more https://cloud.google.com/iap/docs/authentication-howto
func ValidIAPStateToken ¶
check the iap's state
Types ¶
type Config ¶
type Config struct {
OAuthClientId string `json:"oauthClientId" yaml:"oauthClientId"`
OAuthClientSecret string `json:"oauthClientSecret" yaml:"oauthClientSecret"`
IapClientId string `json:"iapClientId" yaml:"iapClientId"`
IapClientRefresh string `json:"iapClientRefresh" yaml:"iapClientRefresh"`
IapIdToken string `json:"iapIdToken" yaml:"iapIdToken"`
ServiceAccountKeyPath string `json:"serviceAccountKeyPath" yaml:"serviceAccountKeyPath"`
}
Config mapping to the config file for IAP
Click to show internal directories.
Click to hide internal directories.