Update trust center handler

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-10-08 20:33:31 +02:00
parent 5c1531bd2b
commit 65b7d90d61
9 changed files with 418 additions and 85 deletions

View File

@@ -21,6 +21,7 @@ import (
"net/http"
"time"
"github.com/getprobo/probo/pkg/gid"
"github.com/getprobo/probo/pkg/probo"
console_v1 "github.com/getprobo/probo/pkg/server/api/console/v1"
"github.com/getprobo/probo/pkg/server/session"
@@ -29,6 +30,21 @@ import (
"go.gearno.de/kit/httpserver"
)
var (
CustomDomainTenantIDKey = &ctxKey{name: "custom_domain_tenant_id"}
CustomDomainOrganizationIDKey = &ctxKey{name: "custom_domain_organization_id"}
)
func GetCustomDomainTenantID(ctx context.Context) (gid.TenantID, bool) {
tenantID, ok := ctx.Value(CustomDomainTenantIDKey).(gid.TenantID)
return tenantID, ok
}
func GetCustomDomainOrganizationID(ctx context.Context) (gid.GID, bool) {
organizationID, ok := ctx.Value(CustomDomainOrganizationIDKey).(gid.GID)
return organizationID, ok
}
type (
AuthTokenRequest struct {
Token string `json:"token"`