mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-31 08:29:33 +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
 | |
| }
 |