Documentation
¶
Index ¶
- type CancelTempLoginResponse
- type ConfirmOwnerRequest
- type ConfirmOwnerResponse
- type ExplicitRoleEmailsResponse
- type Handler
- func (h *Handler) CancelTempLogin(req api.Context) error
- func (h *Handler) ConfirmOwner(req api.Context) error
- func (h *Handler) GetTempUser(req api.Context) error
- func (h *Handler) InitiateTempLogin(req api.Context) error
- func (h *Handler) ListExplicitRoleEmails(req api.Context) error
- func (h *Handler) OAuthComplete(req api.Context) error
- type InitiateTempLoginRequest
- type InitiateTempLoginResponse
- type TempUserInfoResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelTempLoginResponse ¶
type ConfirmOwnerRequest ¶
type ConfirmOwnerRequest struct {
Email string `json:"email"`
}
type ConfirmOwnerResponse ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CancelTempLogin ¶
CancelTempLogin removes the temporary user from the cache and optionally demotes the user in the database. Endpoint: POST /api/setup/cancel-temp-login
func (*Handler) ConfirmOwner ¶
ConfirmOwner confirms the temporary user as a permanent Owner. The user is already in the database (created during OAuth), so we just ensure they have the Owner role and clear the cache. Endpoint: POST /api/setup/confirm-owner
func (*Handler) GetTempUser ¶
GetTempUser returns information about the temporarily cached user. Endpoint: GET /api/setup/temp-user
func (*Handler) InitiateTempLogin ¶
InitiateTempLogin starts an OAuth flow for any user via the specified auth provider. The user does not need to be pre-configured as an Owner - any authenticated user can become the first Owner if the bootstrap user confirms them. Endpoint: POST /api/setup/initiate-temp-login
func (*Handler) ListExplicitRoleEmails ¶
ListExplicitRoleEmails returns all emails with explicit Owner or Admin roles. This is informational only - the bootstrap user can choose to log in as any user, not just those on these lists. Endpoint: GET /api/setup/explicit-role-emails
func (*Handler) OAuthComplete ¶
OAuthComplete handles the OAuth callback for setup flow. This endpoint is called after oauth2-proxy completes authentication. Any authenticated user can be cached - they don't need to be pre-configured as an Owner. The bootstrap user will review their details and decide whether to confirm them as the first Owner. Endpoint: GET /api/setup/oauth-complete
type TempUserInfoResponse ¶
type TempUserInfoResponse struct {
UserID uint `json:"userId"`
Username string `json:"username"`
Email string `json:"email"`
Role types.Role `json:"role"`
Groups []string `json:"groups"`
IconURL string `json:"iconUrl,omitempty"`
AuthProviderName string `json:"authProviderName"`
AuthProviderNamespace string `json:"authProviderNamespace"`
CachedAt string `json:"cachedAt"`
}