Documentation ¶
Index ¶
- func MakeHomepageHandler(config *Config) func(http.ResponseWriter, *http.Request)
- func MakeLoginHandler(config *Config) func(http.ResponseWriter, *http.Request)
- func MakeOAuth2Handler(config *Config) func(http.ResponseWriter, *http.Request)
- func MakeQueryHandler(config *Config, protected []string, restrictedPrefix []string) func(http.ResponseWriter, *http.Request)
- type Config
- type HomepageTokens
- type OpenFaaSCloudClaims
- type ProviderAccessToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeHomepageHandler ¶
func MakeHomepageHandler(config *Config) func(http.ResponseWriter, *http.Request)
MakeHomepageHandler shows the homepage
func MakeLoginHandler ¶
func MakeLoginHandler(config *Config) func(http.ResponseWriter, *http.Request)
MakeLoginHandler creates a handler for logging in
func MakeOAuth2Handler ¶
func MakeOAuth2Handler(config *Config) func(http.ResponseWriter, *http.Request)
MakeOAuth2Handler makes a handler for OAuth 2.0 redirects
func MakeQueryHandler ¶
func MakeQueryHandler(config *Config, protected []string, restrictedPrefix []string) func(http.ResponseWriter, *http.Request)
MakeQueryHandler returns whether a client can access a resource
Types ¶
type Config ¶
type Config struct { OAuthProvider string OAuthProviderBaseURL string ClientID string ClientSecret string OAuthClientSecretPath string // OAuthClientSecretPath when given overrides the ClientSecret env-var ExternalRedirectDomain string Scope string CookieRootDomain string CookieExpiresIn time.Duration PublicKeyPath string PrivateKeyPath string Debug bool // Debug enables verbose logging of claims / cookies }
type HomepageTokens ¶
type OpenFaaSCloudClaims ¶
type OpenFaaSCloudClaims struct { // Name is the full name of the user for OIDC Name string `json:"name"` // AccessToken for use with the GitHub Profile API AccessToken string `json:"access_token"` // String with all organizations separated with commas Organizations string `json:"organizations"` // Inherit from standard claims jwt.StandardClaims }
OpenFaaSCloudClaims extends standard claims
type ProviderAccessToken ¶
type ProviderAccessToken struct {
AccessToken string `json:"access_token"`
}
ProviderAccessToken as issued by GitHub or GitLab
Source Files ¶
Click to show internal directories.
Click to hide internal directories.