@@ -156,6 +156,7 @@ func NewService(
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot create SAML service: %w", err)
|
||||
}
|
||||
|
||||
svc.SAMLService = samlService
|
||||
|
||||
svc.OIDCService = oidc.NewService(
|
||||
@@ -207,10 +208,12 @@ func (s *Service) IsSignUpEnabled() bool {
|
||||
|
||||
func (s *Service) Run(ctx context.Context) error {
|
||||
wg := sync.WaitGroup{}
|
||||
|
||||
ctx, cancel := context.WithCancelCause(ctx)
|
||||
defer cancel(context.Canceled)
|
||||
|
||||
samlCtx, stopSAML := context.WithCancel(context.WithoutCancel(ctx))
|
||||
|
||||
wg.Go(
|
||||
func() {
|
||||
if err := s.SAMLService.Run(samlCtx); err != nil {
|
||||
@@ -220,6 +223,7 @@ func (s *Service) Run(ctx context.Context) error {
|
||||
)
|
||||
|
||||
oidcCtx, stopOIDC := context.WithCancel(context.WithoutCancel(ctx))
|
||||
|
||||
wg.Go(
|
||||
func() {
|
||||
if err := s.OIDCService.Run(oidcCtx); err != nil {
|
||||
@@ -229,6 +233,7 @@ func (s *Service) Run(ctx context.Context) error {
|
||||
)
|
||||
|
||||
domainVerifierCtx, stopDomainVerifier := context.WithCancel(context.WithoutCancel(ctx))
|
||||
|
||||
wg.Go(
|
||||
func() {
|
||||
if err := s.samlDomainVerifier.Run(domainVerifierCtx); err != nil {
|
||||
@@ -238,6 +243,7 @@ func (s *Service) Run(ctx context.Context) error {
|
||||
)
|
||||
|
||||
scimCtx, stopSCIM := context.WithCancel(context.WithoutCancel(ctx))
|
||||
|
||||
wg.Go(
|
||||
func() {
|
||||
if err := s.SCIMService.Run(scimCtx); err != nil {
|
||||
@@ -247,6 +253,7 @@ func (s *Service) Run(ctx context.Context) error {
|
||||
)
|
||||
|
||||
oauth2Ctx, stopOAuth2Server := context.WithCancel(context.WithoutCancel(ctx))
|
||||
|
||||
wg.Go(
|
||||
func() {
|
||||
if err := s.OAuth2ServerService.Run(oauth2Ctx); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user