Documentation
¶
Index ¶
- type ErrorResponse
- type Handlers
- func (h *Handlers) ChangePassword(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GoogleOAuthCallback(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GoogleOAuthLogin(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Login(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Logout(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Profile(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) RefreshToken(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Register(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) RegisterRoutes(mux *http.ServeMux)
- func (h *Handlers) RequestPasswordReset(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ResendVerification(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ResetPassword(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) UnlinkGoogleOAuth(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) VerifyEmail(w http.ResponseWriter, r *http.Request)
- type SuccessResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
ErrorResponse represents an error response
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers provides pre-built HTTP handlers for authentication
func NewHandlers ¶
func NewHandlers(service *auth.Service, routeConfig *config.RouteConfig) *Handlers
NewHandlers creates a new Handlers instance
func (*Handlers) ChangePassword ¶
func (h *Handlers) ChangePassword(w http.ResponseWriter, r *http.Request)
ChangePassword handles changing user password (requires authentication)
func (*Handlers) GoogleOAuthCallback ¶
func (h *Handlers) GoogleOAuthCallback(w http.ResponseWriter, r *http.Request)
GoogleOAuthCallback handles the Google OAuth callback
func (*Handlers) GoogleOAuthLogin ¶
func (h *Handlers) GoogleOAuthLogin(w http.ResponseWriter, r *http.Request)
GoogleOAuthLogin initiates Google OAuth login flow
func (*Handlers) Login ¶
func (h *Handlers) Login(w http.ResponseWriter, r *http.Request)
Login handles user authentication
func (*Handlers) Logout ¶
func (h *Handlers) Logout(w http.ResponseWriter, r *http.Request)
Logout handles user logout (requires authentication)
func (*Handlers) Profile ¶
func (h *Handlers) Profile(w http.ResponseWriter, r *http.Request)
Profile handles retrieving user profile (requires authentication)
func (*Handlers) RefreshToken ¶
func (h *Handlers) RefreshToken(w http.ResponseWriter, r *http.Request)
RefreshToken handles token refresh
func (*Handlers) Register ¶
func (h *Handlers) Register(w http.ResponseWriter, r *http.Request)
Register handles user registration
func (*Handlers) RegisterRoutes ¶
RegisterRoutes registers all authentication routes on the provided mux
func (*Handlers) RequestPasswordReset ¶
func (h *Handlers) RequestPasswordReset(w http.ResponseWriter, r *http.Request)
RequestPasswordReset handles password reset requests
func (*Handlers) ResendVerification ¶
func (h *Handlers) ResendVerification(w http.ResponseWriter, r *http.Request)
ResendVerification handles resending verification email (requires authentication)
func (*Handlers) ResetPassword ¶
func (h *Handlers) ResetPassword(w http.ResponseWriter, r *http.Request)
ResetPassword handles password reset with token
func (*Handlers) UnlinkGoogleOAuth ¶
func (h *Handlers) UnlinkGoogleOAuth(w http.ResponseWriter, r *http.Request)
UnlinkGoogleOAuth handles unlinking a Google OAuth account (requires authentication)
func (*Handlers) VerifyEmail ¶
func (h *Handlers) VerifyEmail(w http.ResponseWriter, r *http.Request)
VerifyEmail handles email verification
type SuccessResponse ¶
type SuccessResponse struct {
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
SuccessResponse represents a success response