diff --git a/http/handler/api/restream.go b/http/handler/api/restream.go index 0ff7072a..dbe9674e 100644 --- a/http/handler/api/restream.go +++ b/http/handler/api/restream.go @@ -16,7 +16,7 @@ import ( // The RestreamHandler type provides functions to interact with a Restreamer instance type RestreamHandler struct { restream restream.Restreamer - iam iam.IAM + iam iam.Enforcer } // NewRestream return a new Restream type. You have to provide a valid Restreamer instance. diff --git a/iam/iam.go b/iam/iam.go index b742bf76..e611f05b 100644 --- a/iam/iam.go +++ b/iam/iam.go @@ -5,8 +5,12 @@ import ( "github.com/datarhei/core/v16/log" ) -type IAM interface { +type Enforcer interface { Enforce(name, domain, resource, action string) bool +} + +type IAM interface { + Enforcer HasDomain(domain string) bool ListDomains() []string