Documentation
¶
Index ¶
- Constants
- func ClearAccountCookie(w http.ResponseWriter, r *http.Request)
- func GetOrganizationIdFromMetadata(ctx context.Context) (string, bool)
- func GetScopedTokenScopesFromMetadata(ctx context.Context) ([]string, bool)
- func GetUserIdFromMetadata(ctx context.Context) (string, bool)
- func SetAccountCookie(w http.ResponseWriter, r *http.Request, token string, ttl time.Duration)
- func SetUserIdInMetadata(ctx context.Context, userId string) context.Context
- type Handler
- type ProviderConfig
Constants ¶
View Source
const SignupDisabledError = "signup is currently disabled"
View Source
const TokenScopesMetadataKey = "x-token-scopes"
Variables ¶
This section is empty.
Functions ¶
func ClearAccountCookie ¶
func ClearAccountCookie(w http.ResponseWriter, r *http.Request)
func GetScopedTokenScopesFromMetadata ¶ added in v0.14.0
func SetAccountCookie ¶ added in v0.21.0
SetAccountCookie writes the account_token cookie with the same flags used by every login path. Centralized so callers (login, signup, magic code, change-password reissue) cannot drift on cookie attributes.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) FindOrCreateAccountForProvider ¶
func (*Handler) InitializeProviders ¶
func (a *Handler) InitializeProviders(providers map[string]ProviderConfig)
func (*Handler) PasswordLoginEnabled ¶ added in v0.21.0
PasswordLoginEnabled reports whether email/password authentication is currently enabled for this installation. Used by handlers outside this package (e.g. the change-password endpoint) that should refuse work when the feature is disabled.
func (*Handler) RegisterRoutes ¶
type ProviderConfig ¶
Click to show internal directories.
Click to hide internal directories.