timetable-mgr/helpers/basicAuth.go

10 lines
230 B
Go
Raw Permalink Normal View History

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