timetable-mgr/src/helpers/basicAuth.go

9 lines
199 B
Go
Raw Normal View History

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