Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CacheProtocol is the protocol used when saving the refresh-token in git-credential-store // It can be an arbitrary value. CacheProtocol = "iap" // CacheUsername is the username used when saving the refresh-token in git-credential-store. // It can be an arbitrary value. CacheUsername = "refresh-token" )
View Source
const ( // IAPCookieName is the name of the HTTP Cookie that will be used to send the IAP Token. // see: https://cloud.google.com/blog/products/gcp/getting-started-with-cloud-identity-aware-proxy IAPCookieName = "GCP_IAAP_AUTH_TOKEN" )
Variables ¶
This section is empty.
Functions ¶
func GetIAPAuthToken ¶
GetIAPAuthToken take care of the IAP Authentication process when relevant. It optmize this workflow by detecting cases where an existing IAP auth token is already available, and caching a refresh-token. It returns a raw IAP auth token and any error encountered.
Types ¶
type Cookie ¶
A Cookie holds pieces of information required to manage the IAP cookie
func NewCookie ¶
NewCookie takes care of the authentication workflow and creates the relevant IAP Cookie on the filesystem
func ReadCookie ¶
ReadCookie lookup the http.cookieFile for a given domain and try to load it from the filesystem
Click to show internal directories.
Click to hide internal directories.