mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 03:13:15 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			298 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			298 B
		
	
	
	
		
			Go
		
	
	
	
	
	
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
 | 
						|
}
 |