Documentation
¶
Index ¶
- func Register(router forge.Router, basePath string, h *handlers.AuthHandler, ...)
- func RegisterApp(router forge.Router, basePath string, h *handlers.AppHandler, ...)
- func RegisterAppRBAC(router forge.Router, h *handlers.AppHandler)
- func RegisterAudit(router forge.Router, basePath string, h *handlers.AuditHandler, ...)
- func RegisterJWT(router forge.Router, basePath string, h interface{})
- func RegisterWebhook(router forge.Router, basePath string, h *handlers.WebhookHandler)
- func RegisterWebhookRoutes(router forge.Router, handler *handlers.WebhookHandler)
- type AppResponse
- type AppsResponse
- type AuditEventsResponse
- type ChangePasswordDTO
- type CookieConfigRequest
- type CookieConfigResponse
- type CookieConfigUpdateResponse
- type DevicesResponse
- type EmailChangeConfirmDTO
- type EmailChangeRequestDTO
- type EmailChangeRequestResponse
- type EmailChangeResponse
- type ErrorResponse
- type InvitationResponse
- type MemberResponse
- type MembersResponse
- type PasswordChangeResponse
- type PasswordResetConfirmDTO
- type PasswordResetRequestDTO
- type PasswordResetRequestResponse
- type PasswordResetResponse
- type PoliciesResponse
- type PolicyResponse
- type RefreshSessionRequest
- type RefreshSessionResponse
- type RevokeDeviceRequest
- type RoleResponse
- type RolesResponse
- type SessionResponse
- type SignOutRequest
- type StatusResponse
- type TeamMembersResponse
- type TeamResponse
- type TeamsResponse
- type TokenValidationResponse
- type UpdateUserRequest
- type UserRolesResponse
- type WebhookDeleteResponse
- type WebhookErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(router forge.Router, basePath string, h *handlers.AuthHandler, authMiddleware forge.Middleware)
Register registers auth routes using forge.Router authMiddleware is applied to all routes to extract and validate API keys for app identification
func RegisterApp ¶
func RegisterApp(router forge.Router, basePath string, h *handlers.AppHandler, authMiddleware forge.Middleware)
RegisterApp registers app (platform tenant) routes under a base path This is used when multitenancy plugin is NOT enabled
func RegisterAppRBAC ¶
func RegisterAppRBAC(router forge.Router, h *handlers.AppHandler)
RegisterAppRBAC registers RBAC-related routes (policies, roles, user roles) This is used when multitenancy plugin IS enabled to supplement its routes Note: These routes don't apply middleware as they're nested under RegisterApp which already applies it
func RegisterAudit ¶
func RegisterAudit(router forge.Router, basePath string, h *handlers.AuditHandler, authMiddleware forge.Middleware)
RegisterAudit registers audit routes under a base path
func RegisterJWT ¶
RegisterJWT is DEPRECATED - JWT routes are now handled by the JWT plugin. The JWT plugin registers its own routes via plugin.RegisterRoutes(). Use: auth.RegisterPlugin(jwt.NewPlugin())
func RegisterWebhook ¶
func RegisterWebhook(router forge.Router, basePath string, h *handlers.WebhookHandler)
RegisterWebhook registers webhook routes under a base path
func RegisterWebhookRoutes ¶
func RegisterWebhookRoutes(router forge.Router, handler *handlers.WebhookHandler)
RegisterWebhookRoutes registers webhook-related routes
Types ¶
type AppResponse ¶
type AppResponse struct{}
App DTOs (placeholder types - actual implementations should be in handlers or core)
type AppsResponse ¶
type AppsResponse []interface{}
type AuditEventsResponse ¶
type AuditEventsResponse struct {
Data interface{} `json:"data"`
Total int `json:"total"`
Page int `json:"page"`
PageSize int `json:"page_size"`
TotalPages int `json:"total_pages"`
}
AuditEventsResponse represents a paginated list of audit events
type ChangePasswordDTO ¶ added in v0.0.6
type ChangePasswordDTO struct {
OldPassword string `json:"oldPassword" validate:"required" example:"CurrentPass123!"`
NewPassword string `json:"newPassword" validate:"required,min=8" example:"NewSecurePass123!"`
}
ChangePasswordDTO represents a password change request
type CookieConfigRequest ¶ added in v0.0.2
type CookieConfigRequest struct{}
type CookieConfigResponse ¶ added in v0.0.2
type CookieConfigResponse struct{}
type CookieConfigUpdateResponse ¶ added in v0.0.2
type CookieConfigUpdateResponse struct{}
type DevicesResponse ¶
DevicesResponse represents a list of devices
type EmailChangeConfirmDTO ¶ added in v0.0.6
type EmailChangeConfirmDTO struct {
Token string `json:"token" validate:"required" example:"change_token_here"`
}
EmailChangeConfirmDTO represents an email change confirmation
type EmailChangeRequestDTO ¶ added in v0.0.6
type EmailChangeRequestDTO struct {
NewEmail string `json:"newEmail" validate:"required,email" example:"newemail@example.com"`
}
EmailChangeRequestDTO represents an email change request
type EmailChangeRequestResponse ¶ added in v0.0.6
type EmailChangeRequestResponse struct {
Message string `json:"message" example:"Email change confirmation sent to your current email address"`
}
EmailChangeRequestResponse represents the response to an email change request
type EmailChangeResponse ¶ added in v0.0.6
type EmailChangeResponse struct {
Message string `json:"message" example:"Email address has been changed successfully"`
}
EmailChangeResponse represents the response to an email change confirmation
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error" example:"Error message"`
}
ErrorResponse represents an error response
type InvitationResponse ¶
type InvitationResponse struct{}
type MemberResponse ¶
type MemberResponse struct{}
type MembersResponse ¶
type MembersResponse []interface{}
type PasswordChangeResponse ¶ added in v0.0.6
type PasswordChangeResponse struct {
Message string `json:"message" example:"Password changed successfully"`
}
PasswordChangeResponse represents the response to a password change
type PasswordResetConfirmDTO ¶ added in v0.0.6
type PasswordResetConfirmDTO struct {
Token string `json:"token" validate:"required" example:"reset_token_here"`
NewPassword string `json:"newPassword" validate:"required,min=8" example:"NewSecurePass123!"`
}
PasswordResetConfirmDTO represents a password reset confirmation
type PasswordResetRequestDTO ¶ added in v0.0.6
type PasswordResetRequestDTO struct {
Email string `json:"email" validate:"required,email" example:"user@example.com"`
}
PasswordResetRequestDTO represents a password reset request
type PasswordResetRequestResponse ¶ added in v0.0.6
type PasswordResetRequestResponse struct {
Message string `json:"message" example:"If the email exists, a password reset link has been sent"`
}
PasswordResetRequestResponse represents the response to a password reset request
type PasswordResetResponse ¶ added in v0.0.6
type PasswordResetResponse struct {
Message string `json:"message" example:"Password has been reset successfully"`
}
PasswordResetResponse represents the response to a password reset confirmation
type PoliciesResponse ¶
type PoliciesResponse []interface{}
type RefreshSessionRequest ¶ added in v0.0.3
type RefreshSessionRequest struct {
RefreshToken string `json:"refreshToken" validate:"required" example:"refresh_token_here"`
}
type RefreshSessionResponse ¶ added in v0.0.3
type RevokeDeviceRequest ¶
type RevokeDeviceRequest struct {
Fingerprint string `json:"fingerprint" validate:"required" example:"device_fingerprint_here"`
}
RevokeDeviceRequest represents a device revocation request
type RoleResponse ¶
type RoleResponse struct{}
type RolesResponse ¶
type RolesResponse []interface{}
type SessionResponse ¶
type SessionResponse struct {
User *user.User `json:"user"`
Session map[string]interface{} `json:"session"`
}
SessionResponse represents session information
type SignOutRequest ¶
type SignOutRequest struct {
Token string `json:"token" validate:"required" example:"session_token_here"`
}
SignOutRequest represents a sign out request
type StatusResponse ¶
type StatusResponse struct {
Status string `json:"status" example:"success"`
}
StatusResponse represents a status response
type TeamMembersResponse ¶
type TeamMembersResponse []interface{}
type TeamResponse ¶
type TeamResponse struct{}
type TeamsResponse ¶
type TeamsResponse []interface{}
type TokenValidationResponse ¶ added in v0.0.6
type TokenValidationResponse struct {
Valid bool `json:"valid" example:"true"`
}
TokenValidationResponse represents a token validation response
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Name *string `json:"name,omitempty" example:"John Doe"`
Image *string `json:"image,omitempty" example:"https://example.com/avatar.jpg"`
Username *string `json:"username,omitempty" example:"johndoe"`
DisplayUsername *string `json:"display_username,omitempty" example:"John D."`
}
UpdateUserRequest represents a user update request
type UserRolesResponse ¶
type UserRolesResponse []interface{}
type WebhookDeleteResponse ¶
type WebhookDeleteResponse struct {
Message string `json:"message" example:"webhook deleted successfully"`
}
WebhookDeleteResponse represents a successful webhook deletion
type WebhookErrorResponse ¶
type WebhookErrorResponse struct {
Error string `json:"error" example:"Error message"`
}
WebhookErrorResponse represents an error response