routes

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func RegisterJWT(router forge.Router, basePath string, h interface{})

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 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

type DevicesResponse []device.Device

DevicesResponse represents a list of devices

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 PoliciesResponse

type PoliciesResponse []interface{}

type PolicyResponse

type PolicyResponse struct{}

RBAC DTOs

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 RefreshSessionResponse struct {
	Session          interface{} `json:"session"`
	AccessToken      string      `json:"accessToken"`
	RefreshToken     string      `json:"refreshToken"`
	ExpiresAt        string      `json:"expiresAt"`
	RefreshExpiresAt string      `json:"refreshExpiresAt"`
}

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 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL