timetable-mgr/helpers/basicAuth.go
Fred Boniface 493fb41da8
Some checks failed
Go Test / test (push) Failing after 48s
Reorganise repo
2024-04-05 22:23:42 +01:00

10 lines
230 B
Go

package helpers
import "encoding/base64"
// Provides a BasicAuth string
func BasicAuth(username, password string) string {
authString := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(authString))
}