Add compliance portal visitor OAuth service

Handle OAuth initiation, callback exchange, and session creation
for anonymous trust center visitors through the portal package.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-15 10:58:59 +02:00
parent fa0ae32232
commit 27dc61ef82
3 changed files with 240 additions and 0 deletions

View File

@@ -30,6 +30,31 @@ import (
"go.probo.inc/probo/pkg/page"
)
func (s *Service) GetComplianceFramework(
ctx context.Context,
scope coredata.Scoper,
complianceFrameworkID gid.GID,
) (*coredata.ComplianceFramework, error) {
cf := &coredata.ComplianceFramework{}
err := s.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) error {
err := cf.LoadByID(ctx, conn, scope, complianceFrameworkID)
if err != nil {
return fmt.Errorf("cannot load compliance framework: %w", err)
}
return nil
},
)
if err != nil {
return nil, err
}
return cf, nil
}
func (s *Service) ListComplianceFrameworksByPortalID(
ctx context.Context,
scope coredata.Scoper,