From 5e510856955ba7e54600687723045925b65f875a Mon Sep 17 00:00:00 2001 From: Allan Nava Date: Thu, 26 Jan 2023 11:36:50 +0100 Subject: [PATCH] added CreateOmeBasicAuthHeaderWord --- ovenmedia/header_configurator.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ovenmedia/header_configurator.go b/ovenmedia/header_configurator.go index a31fec2..ffc65be 100644 --- a/ovenmedia/header_configurator.go +++ b/ovenmedia/header_configurator.go @@ -83,6 +83,10 @@ func (h *HeaderConfigurator) CreateBasicAuthHeaderEncoded(base64EncodedToken str } +func (h *HeaderConfigurator) CreateOmeBasicAuthHeaderWord(word string) { + h.Headers["ome-access-token"] = "Basic " + base64.StdEncoding.EncodeToString([]byte(word)) +} + func (h *HeaderConfigurator) CreateOmeBasicAuthHeader(username string, password string) { h.Headers["ome-access-token"] = "Basic " + base64.StdEncoding.EncodeToString([]byte(username+":"+password)) }