Version: v0.0.0-...-f1c27b4 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2020 License: MIT Imports: 15 Imported by: 0




This section is empty.


This section is empty.


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


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 HomepageTokens struct {
	AccessToken string
	Login       string

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

OpenFaaSCloudClaims extends standard claims

type ProviderAccessToken

type ProviderAccessToken struct {
	AccessToken string `json:"access_token"`

ProviderAccessToken as issued by GitHub or GitLab

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL