Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthCookie ¶
type AuthCookie struct { ExpiresUnixSec int64 `json:"exp"` Email string `json:"email"` Domain string `json:"domain,omitempty"` }
AuthCookie represents the data stored in the requestor's cookie jar to authenticate future requests.
func (*AuthCookie) Base64 ¶
func (c *AuthCookie) Base64() string
func (*AuthCookie) Expired ¶
func (c *AuthCookie) Expired() bool
type AuthorizedConfig ¶
type CSRFCookie ¶
type CSRFCookie struct { ExpiresUnixSec int64 `json:"exp"` Nonce string `json:"nonce"` RedirectURL string `json:"url"` // URI to redirect the user after authenticating. }
func (*CSRFCookie) Base64 ¶
func (c *CSRFCookie) Base64() string
func (*CSRFCookie) Expired ¶
func (c *CSRFCookie) Expired() bool
type Config ¶
type Config struct { OIDC OIDCConfig Cookie CookieConfig Authorized AuthorizedConfig Debug bool // Enable debug logging to stdout. }
Config the plugin configuration.
func CreateConfig ¶
func CreateConfig() *Config
CreateConfig creates the default plugin configuration.
type CookieConfig ¶
type CookieConfig struct { Name string // Name of the cookie. It can be customized to avoid collisions when running multiple instances of the middleware. Path string // You can use this to limit the scope of the cookie to a specific path. Defaults to '/'. Secret string // Secret is the HMAC key and helps provide integrity protection for cookies. Duration string // Validity period for new cookies. Users are granted access for this length of time regardless of changes to user's account in the OIDC provider. Insecure bool // Only set this if you are using HTTP. // contains filtered or unexported fields }
type OIDCConfig ¶
type OIDCConfig struct { // The OAuth Client ID from the provider for OIDC roles. ClientID string // The OAuth Client Secret from the provider for OIDC roles. ClientSecret string // The path where the OIDC provider will redirect user after authenticating. CallbackPath string // Prompt is an optional, space-delimited, case-sensitive list of prompts to // present the user. If you don't specify this parameter, the user will be // prompted only the first time your project requests access. // Possible values are: 'none', 'consent', 'select_account'. Prompt string }
Click to show internal directories.
Click to hide internal directories.