Skip to content

Commit 37fe041

Browse files
committed
chore: Updated
1 parent 67c7b4b commit 37fe041

4 files changed

Lines changed: 3 additions & 132 deletions

File tree

config.example.toml

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -142,65 +142,6 @@ buffer_size = 100
142142

143143
[plugins]
144144

145-
# --- Config Manager Plugin (allows runtime configuration changes via the Admin API) ---
146-
147-
# [plugins.config_manager]
148-
# enabled = true
149-
150-
# --- Access Control Plugin (role based access control) ---
151-
152-
# [plugins.access_control]
153-
# enabled = true
154-
155-
# --- Admin Plugin (user, state, and impersonation operations) ---
156-
157-
# [plugins.admin]
158-
# enabled = true
159-
# impersonation_max_expires_in = "15m"
160-
161-
# --- Secondary Storage Plugin (provides secondary storage backends for other plugins) ---
162-
163-
[plugins.secondary_storage]
164-
enabled = true
165-
provider = "memory" # Options: "memory", "database", "redis"
166-
167-
[plugins.secondary_storage.memory]
168-
cleanup_interval = "1m"
169-
170-
# [plugins.secondary_storage.database]
171-
# cleanup_interval = "1m"
172-
173-
# [plugins.secondary_storage.redis]
174-
# SECURITY NOTE: It is recommended to set the 'url' via the
175-
# REDIS_URL environment variable rather than hardcoding it here.
176-
# url = ""
177-
# max_retries = 3
178-
# pool_size = 10
179-
# pool_timeout = "30s"
180-
181-
# --- Email Plugin (handles email sending via SMTP or Resend) ---
182-
183-
[plugins.email]
184-
enabled = true
185-
provider = "smtp" # Options: "smtp", "resend"
186-
# Can also be set via FROM_ADDRESS environment variable
187-
from_address = ""
188-
tls_mode = "starttls" # Options: "off", "starttls", "tls"
189-
# Optional: Fallback provider if primary fails
190-
# fallback_provider = "resend"
191-
192-
# SMTP Configuration (when provider = "smtp")
193-
# [plugins.email.smtp]
194-
# host = ""
195-
# port = # Options: 25, 465, 587, 2525,
196-
# user = ""
197-
# pass = ""
198-
199-
# Resend Configuration (when provider = "resend")
200-
# [plugins.email.resend]
201-
# NOTE: it is recommended to set the Resend API key via the RESEND_API_KEY environment variable rather than hardcoding it here.
202-
# api_key = ""
203-
204145
# --- CSRF Plugin (for protecting against CSRF attacks) ---
205146

206147
[plugins.csrf]
@@ -332,80 +273,10 @@ enabled = true
332273
# [plugins.ratelimit.database]
333274
# cleanup_interval = "1m" # How often to remove expired entries from database (default: 1m)
334275

335-
# --- Magic Link Plugin (Passwordless Authentication) ---
336-
337-
# [plugins.magic_link]
338-
# enabled = true
339-
# expires_in = "15m"
340-
# disable_sign_up = false
341-
342-
# --- TOTP Plugin (Time-based One-Time Password) ---
343-
344-
# [plugins.totp]
345-
# enabled = true
346-
# skip_verification_on_enable = false
347-
# backup_code_count = 10
348-
# trusted_device_duration = "720h"
349-
# trusted_devices_auto_cleanup = true
350-
# trusted_devices_cleanup_interval = "1h"
351-
# pending_token_expiry = "10m"
352-
# secure_cookie = false
353-
# same_site = "lax" # Options: "lax", "strict", "none"
354-
355-
# --- Organizations Plugin ---
356-
357-
# [plugins.organizations]
358-
# enabled = true
359-
# invitation_expires_in = "168h"
360-
361276
# -----------------------------------
362277
# - Route-to-Plugin Mappings (Standalone Mode)
363278
# -----------------------------------
364279
# Declaratively map routes to plugins for hook execution.
365280
# In standalone mode, all plugin-to-route associations are defined here via [[route_mappings]] tables.
366281
# This enables full plugin routing control without code changes.
367282
# Plugin IDs follow the format "{plugin_name}.{operation}" (e.g., "session.auth", "csrf.protect")
368-
369-
# Example routes:
370-
# [[route_mappings]]
371-
# path = "/me"
372-
# method = "GET"
373-
# plugins = ["session.auth"] (SSR) or ["bearer.auth"] (SPA/mobile)
374-
375-
# [[route_mappings]]
376-
# path = "/sign-in"
377-
# method = "POST"
378-
# plugins = ["session.auth.optional"]
379-
380-
# [[route_mappings]]
381-
# path = "/sign-up"
382-
# method = "POST"
383-
384-
# [[route_mappings]]
385-
# path = "/change-password"
386-
# method = "POST"
387-
# plugins = ["session.auth", "csrf.protect"]
388-
389-
# [[route_mappings]]
390-
# path = "/sign-out"
391-
# method = "POST"
392-
# plugins = ["session.auth", "csrf.protect"]
393-
394-
# Access control (opt-in per route)
395-
# [[route_mappings]]
396-
# path = "/admin/users"
397-
# method = "GET"
398-
# plugins = ["session.auth", "access_control.enforce"]
399-
# permissions = ["users.read"]
400-
401-
# If using TOTP plugin, keep /totp/verify and /totp/verify-backup-code accessible
402-
# to the pending-token flow (do not require an existing session cookie).
403-
# [[route_mappings]]
404-
# path = "/totp/verify"
405-
# method = "POST"
406-
# plugins = ["session.auth.optional"]
407-
408-
# [[route_mappings]]
409-
# path = "/totp/verify-backup-code"
410-
# method = "POST"
411-
# plugins = ["session.auth.optional"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package constants
22

33
const (
4-
EventOrganizationInvitationCreated = "organization.invitation.created"
4+
EventOrganizationsInvitationCreated = "organizations.invitation.created"
55
)

plugins/organizations/services/organization_invitation_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (s *OrganizationInvitationService) publishOrganizationInvitationCreatedEven
175175

176176
util.PublishEventAsync(s.eventBus, s.logger, models.Event{
177177
ID: util.GenerateUUID(),
178-
Type: orgconstants.EventOrganizationInvitationCreated,
178+
Type: orgconstants.EventOrganizationsInvitationCreated,
179179
Timestamp: time.Now().UTC(),
180180
Payload: payload,
181181
})

plugins/organizations/services/organization_invitation_service_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ func TestOrganizationInvitationService_CreateOrganizationInvitation_SendsEmailAn
659659
require.Contains(t, mailCall.html, "Accept invitation")
660660

661661
event := <-eventCalls
662-
require.Equal(t, orgconstants.EventOrganizationInvitationCreated, event.Type)
662+
require.Equal(t, orgconstants.EventOrganizationsInvitationCreated, event.Type)
663663

664664
var payload orgevents.OrganizationInvitationCreatedEvent
665665
require.NoError(t, json.Unmarshal(event.Payload, &payload))

0 commit comments

Comments
 (0)