frp/test/e2e/pkg/utils/utils.go
2021-06-18 16:48:36 +08:00

11 lines
197 B
Go

package utils
import (
"encoding/base64"
)
func BasicAuth(username, passwd string) string {
auth := username + ":" + passwd
return "Basic " + base64.StdEncoding.EncodeToString([]byte(auth))
}