You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
298 B
14 lines
298 B
1 year ago
|
package common
|
||
|
|
||
|
import (
|
||
|
"encoding/base64"
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
func GetAuthorization(Appkey string, MasterSecret string) string {
|
||
|
str := fmt.Sprintf("%s:%s", Appkey, MasterSecret)
|
||
|
buf := []byte(str)
|
||
|
Authorization := fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString(buf))
|
||
|
return Authorization
|
||
|
}
|