Skip to content

Commit

Permalink
add signing key capability (#986)
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic authored Jul 21, 2020
1 parent fd224e4 commit 2d1a830
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/add-signing-key-capability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Added signing key capability

The ocs capabilities can now hold the boolean flag to indicate url signing endpoint and middleware are available

https://github.com/cs3org/reva/pull/986
7 changes: 4 additions & 3 deletions internal/http/services/owncloud/ocs/data/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ type Capabilities struct {

// CapabilitiesCore holds webdav config
type CapabilitiesCore struct {
PollInterval int `json:"pollinterval" xml:"pollinterval" mapstructure:"poll_interval"`
WebdavRoot string `json:"webdav-root,omitempty" xml:"webdav-root,omitempty" mapstructure:"webdav_root"`
Status *Status `json:"status" xml:"status"`
PollInterval int `json:"pollinterval" xml:"pollinterval" mapstructure:"poll_interval"`
WebdavRoot string `json:"webdav-root,omitempty" xml:"webdav-root,omitempty" mapstructure:"webdav_root"`
Status *Status `json:"status" xml:"status"`
SupportURLSigning ocsBool `json:"support-url-signing" xml:"support-url-signing" mapstructure:"support-url-signing"`
}

// Status holds basic status information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (h *Handler) Init(c *config.Config) {
if h.c.Capabilities.Core.WebdavRoot == "" {
h.c.Capabilities.Core.WebdavRoot = "remote.php/webdav"
}
// h.c.Capabilities.Core.SupportURLSigning is boolean

if h.c.Capabilities.Core.Status == nil {
h.c.Capabilities.Core.Status = &data.Status{}
Expand Down

0 comments on commit 2d1a830

Please sign in to comment.