Commit 47e25b8a authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Add IAP config json and yaml tags.

parent e75f3c7e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ func getGoogleAccessToken(ctx context.Context, httpc *http.Client, email string,
	token := jwt.NewWithClaims(jwt.SigningMethodRS256, claims)
	block, _ := pem.Decode([]byte(privateKey))
	if block == nil {
		return "", errors.New("pem.Decode error")
		return "", errors.New("google iap private key invalid")
	}

	pk, err := x509.ParsePKCS8PrivateKey(block.Bytes)
+3 −3
Original line number Diff line number Diff line
@@ -900,9 +900,9 @@ func NewMatchmakerConfig() *MatchmakerConfig {
}

type IAPConfig struct {
	Apple  *IAPAppleConfig
	Google *IAPGoogleConfig
	Huawei *IAPHuaweiConfig
	Apple  *IAPAppleConfig  `yaml:"apple" json:"apple" usage:"Apple App Store purchase validation configuration."`
	Google *IAPGoogleConfig `yaml:"google" json:"google" usage:"Google Play Store purchase validation configuration."`
	Huawei *IAPHuaweiConfig `yaml:"huawei" json:"huawei" usage:"Huawei purchase validation configuration."`
}

func NewIAPConfig() *IAPConfig {