feat(auth-app): make service optional plus docu
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
@@ -3,7 +3,6 @@ package service
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
authapp "github.com/owncloud/ocis/v2/services/auth-app/pkg/command"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/rpc"
|
||||
@@ -14,6 +13,8 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
authapp "github.com/owncloud/ocis/v2/services/auth-app/pkg/command"
|
||||
|
||||
"github.com/cenkalti/backoff"
|
||||
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||
"github.com/cs3org/reva/v2/pkg/logger"
|
||||
@@ -161,11 +162,6 @@ func NewService(options ...Option) (*Service, error) {
|
||||
cfg.AppRegistry.Commons = cfg.Commons
|
||||
return appRegistry.Execute(cfg.AppRegistry)
|
||||
})
|
||||
reg(3, opts.Config.AuthApp.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
|
||||
cfg.AuthApp.Context = ctx
|
||||
cfg.AuthApp.Commons = cfg.Commons
|
||||
return authapp.Execute(cfg.AuthApp)
|
||||
})
|
||||
reg(3, opts.Config.AuthBasic.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
|
||||
cfg.AuthBasic.Context = ctx
|
||||
cfg.AuthBasic.Commons = cfg.Commons
|
||||
@@ -330,6 +326,11 @@ func NewService(options ...Option) (*Service, error) {
|
||||
cfg.Audit.Commons = cfg.Commons
|
||||
return audit.Execute(cfg.Audit)
|
||||
})
|
||||
areg(opts.Config.AuthApp.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
|
||||
cfg.AuthApp.Context = ctx
|
||||
cfg.AuthApp.Commons = cfg.Commons
|
||||
return authapp.Execute(cfg.AuthApp)
|
||||
})
|
||||
areg(opts.Config.Policies.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
|
||||
cfg.Policies.Context = ctx
|
||||
cfg.Policies.Commons = cfg.Commons
|
||||
|
||||
Reference in New Issue
Block a user