mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-27 15:32:15 -05:00
Merge pull request #69 from owncloud/fix/create-home-init
This commit is contained in:
5
changelog/unreleased/fix-createhome-middleware.md
Normal file
5
changelog/unreleased/fix-createhome-middleware.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Bugfix: Provide token configuration from config
|
||||
|
||||
Fixed a bug that causes the createHome middleware to crash if no configuration for the TokenManager is propagated.
|
||||
|
||||
https://github.com/owncloud/ocis-proxy/pull/69
|
||||
@@ -3,9 +3,7 @@
|
||||
"Namespace": "com.owncloud"
|
||||
},
|
||||
"oidc": {
|
||||
"endpoint": "https://localhost:9200",
|
||||
"realm": "",
|
||||
"signing_algs": ["RS256", "PS256"],
|
||||
"issuer": "https://localhost:9200",
|
||||
"insecure": true
|
||||
},
|
||||
"policy_selector": {
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
"Namespace": "com.owncloud"
|
||||
},
|
||||
"oidc": {
|
||||
"endpoint": "https://localhost:9200",
|
||||
"realm": "",
|
||||
"signing_algs": ["RS256", "PS256"],
|
||||
"issuer": "https://localhost:9200",
|
||||
"insecure": true
|
||||
},
|
||||
"policy_selector": {
|
||||
|
||||
@@ -296,6 +296,7 @@ func loadMiddlewares(ctx context.Context, l log.Logger, cfg *config.Config) alic
|
||||
middleware.Logger(l),
|
||||
middleware.RevaGatewayClient(sc),
|
||||
middleware.AccountsClient(accounts),
|
||||
middleware.TokenManagerConfig(cfg.TokenManager),
|
||||
)
|
||||
|
||||
return alice.New(middleware.RedirectToHTTPS, oidcMW, uuidMW, chMW)
|
||||
|
||||
@@ -25,6 +25,7 @@ func CreateHome(opts ...Option) func(next http.Handler) http.Handler {
|
||||
"secret": opt.TokenManagerConfig.JWTSecret,
|
||||
})
|
||||
if err != nil {
|
||||
opt.Logger.Error().Err(err).Msg("error creating a token manager")
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user