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 any)
- func RegisterWebhook(router forge.Router, basePath string, h *handlers.WebhookHandler)
- func RegisterWebhookRoutes(router forge.Router, handler *handlers.WebhookHandler)
- type ActionsAggregationResponse
- type AggregationsResponse
- type AppResponse
- type AppsAggregationResponse
- 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 IPsAggregationResponse
- type InvitationResponse
- type MemberResponse
- type MembersResponse
- type OrganizationsAggregationResponse
- type PasswordChangeResponse
- type PasswordResetConfirmDTO
- type PasswordResetRequestDTO
- type PasswordResetRequestResponse
- type PasswordResetResponse
- type PoliciesResponse
- type PolicyResponse
- type RefreshSessionRequest
- type RefreshSessionResponse
- type ResourcesAggregationResponse
- type RevokeDeviceRequest
- type RoleResponse
- type RolesResponse
- type SessionResponse
- type SignOutRequest
- type SourcesAggregationResponse
- type StatusResponse
- type TeamMembersResponse
- type TeamResponse
- type TeamsResponse
- type TokenValidationResponse
- type UpdateUserRequest
- type UserRolesResponse
- type UsersAggregationResponse
- 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 Register 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 RegisterApp 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 RegisterAppRBAC 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(). RegisterJWT 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 ActionsAggregationResponse ¶ added in v0.0.15
type ActionsAggregationResponse struct{}
type AggregationsResponse ¶ added in v0.0.15
type AggregationsResponse struct{}
AggregationsResponse response types.
type AppResponse ¶
type AppResponse struct{}
AppResponse DTOs (placeholder types - actual implementations should be in handlers or core).
type AppsAggregationResponse ¶ added in v0.0.15
type AppsAggregationResponse struct{}
type AppsResponse ¶
type AppsResponse []any
type AuditEventsResponse ¶
type AuditEventsResponse struct {
Data any `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 `example:"CurrentPass123!" json:"oldPassword" validate:"required"`
NewPassword string `example:"NewSecurePass123!" json:"newPassword" validate:"required,min=8"`
}
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 `example:"change_token_here" json:"token" validate:"required"`
}
EmailChangeConfirmDTO represents an email change confirmation.
type EmailChangeRequestDTO ¶ added in v0.0.6
type EmailChangeRequestDTO struct {
NewEmail string `example:"newemail@example.com" json:"newEmail" validate:"required,email"`
}
EmailChangeRequestDTO represents an email change request.
type EmailChangeRequestResponse ¶ added in v0.0.6
type EmailChangeRequestResponse struct {
Message string `example:"Email change confirmation sent to your current email address" json:"message"`
}
EmailChangeRequestResponse represents the response to an email change request.
type EmailChangeResponse ¶ added in v0.0.6
type EmailChangeResponse struct {
Message string `example:"Email address has been changed successfully" json:"message"`
}
EmailChangeResponse represents the response to an email change confirmation.
type ErrorResponse ¶
type ErrorResponse struct {
Error string `example:"Error message" json:"error"`
}
ErrorResponse represents an error response.
type IPsAggregationResponse ¶ added in v0.0.15
type IPsAggregationResponse struct{}
type InvitationResponse ¶
type InvitationResponse struct{}
type MemberResponse ¶
type MemberResponse struct{}
type MembersResponse ¶
type MembersResponse []any
type OrganizationsAggregationResponse ¶ added in v0.0.15
type OrganizationsAggregationResponse struct{}
type PasswordChangeResponse ¶ added in v0.0.6
type PasswordChangeResponse struct {
Message string `example:"Password changed successfully" json:"message"`
}
PasswordChangeResponse represents the response to a password change.
type PasswordResetConfirmDTO ¶ added in v0.0.6
type PasswordResetConfirmDTO struct {
Token string `example:"reset_token_here" json:"token" validate:"required"`
NewPassword string `example:"NewSecurePass123!" json:"newPassword" validate:"required,min=8"`
}
PasswordResetConfirmDTO represents a password reset confirmation.
type PasswordResetRequestDTO ¶ added in v0.0.6
type PasswordResetRequestDTO struct {
Email string `example:"user@example.com" json:"email" validate:"required,email"`
}
PasswordResetRequestDTO represents a password reset request.
type PasswordResetRequestResponse ¶ added in v0.0.6
type PasswordResetRequestResponse struct {
Message string `example:"If the email exists, a password reset link has been sent" json:"message"`
}
PasswordResetRequestResponse represents the response to a password reset request.
type PasswordResetResponse ¶ added in v0.0.6
type PasswordResetResponse struct {
Message string `example:"Password has been reset successfully" json:"message"`
}
PasswordResetResponse represents the response to a password reset confirmation.
type PoliciesResponse ¶
type PoliciesResponse []any
type RefreshSessionRequest ¶ added in v0.0.3
type RefreshSessionRequest struct {
RefreshToken string `example:"refresh_token_here" json:"refreshToken" validate:"required"`
}
type RefreshSessionResponse ¶ added in v0.0.3
type ResourcesAggregationResponse ¶ added in v0.0.15
type ResourcesAggregationResponse struct{}
type RevokeDeviceRequest ¶
type RevokeDeviceRequest struct {
Fingerprint string `example:"device_fingerprint_here" json:"fingerprint" validate:"required"`
}
RevokeDeviceRequest represents a device revocation request.
type RoleResponse ¶
type RoleResponse struct{}
type RolesResponse ¶
type RolesResponse []any
type SessionResponse ¶
type SessionResponse struct {
User *user.User `json:"user"`
Session map[string]any `json:"session"`
}
SessionResponse represents session information.
type SignOutRequest ¶
type SignOutRequest struct {
Token string `example:"session_token_here" json:"token" validate:"required"`
}
SignOutRequest represents a sign out request.
type SourcesAggregationResponse ¶ added in v0.0.15
type SourcesAggregationResponse struct{}
type StatusResponse ¶
type StatusResponse struct {
Status string `example:"success" json:"status"`
}
StatusResponse represents a status response.
type TeamMembersResponse ¶
type TeamMembersResponse []any
type TeamResponse ¶
type TeamResponse struct{}
type TeamsResponse ¶
type TeamsResponse []any
type TokenValidationResponse ¶ added in v0.0.6
type TokenValidationResponse struct {
Valid bool `example:"true" json:"valid"`
}
TokenValidationResponse represents a token validation response.
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Name *string `example:"John Doe" json:"name,omitempty"`
Image *string `example:"https://example.com/avatar.jpg" json:"image,omitempty"`
Username *string `example:"johndoe" json:"username,omitempty"`
DisplayUsername *string `example:"John D." json:"display_username,omitempty"`
}
UpdateUserRequest represents a user update request.
type UserRolesResponse ¶
type UserRolesResponse []any
type UsersAggregationResponse ¶ added in v0.0.15
type UsersAggregationResponse struct{}
type WebhookDeleteResponse ¶
type WebhookDeleteResponse struct {
Message string `example:"webhook deleted successfully" json:"message"`
}
WebhookDeleteResponse represents a successful webhook deletion.
type WebhookErrorResponse ¶
type WebhookErrorResponse struct {
Error string `example:"Error message" json:"error"`
}
WebhookErrorResponse represents an error response.