allow \n
in private-key envs
This commit is contained in:
parent
43d0107fb5
commit
c05deb3a41
@ -9,6 +9,7 @@ import (
|
|||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -23,7 +24,9 @@ type AndroidPublisher struct {
|
|||||||
|
|
||||||
func NewAndroidPublisherAPI(conf scn.Config) (AndroidPublisherClient, error) {
|
func NewAndroidPublisherAPI(conf scn.Config) (AndroidPublisherClient, error) {
|
||||||
|
|
||||||
googauth, err := NewAuth(conf.GoogleAPITokenURI, conf.GoogleAPIPrivKeyID, conf.GoogleAPIClientMail, conf.GoogleAPIPrivateKey)
|
pkey := strings.ReplaceAll(conf.GoogleAPIPrivateKey, "\\n", "\n")
|
||||||
|
|
||||||
|
googauth, err := NewAuth(conf.GoogleAPITokenURI, conf.GoogleAPIPrivKeyID, conf.GoogleAPIClientMail, pkey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -29,7 +30,9 @@ type FirebaseConnector struct {
|
|||||||
|
|
||||||
func NewFirebaseConn(conf scn.Config) (NotificationClient, error) {
|
func NewFirebaseConn(conf scn.Config) (NotificationClient, error) {
|
||||||
|
|
||||||
fbauth, err := NewAuth(conf.FirebaseTokenURI, conf.FirebaseProjectID, conf.FirebaseClientMail, conf.FirebasePrivateKey)
|
pkey := strings.ReplaceAll(conf.FirebasePrivateKey, "\\n", "\n")
|
||||||
|
|
||||||
|
fbauth, err := NewAuth(conf.FirebaseTokenURI, conf.FirebaseProjectID, conf.FirebaseClientMail, pkey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user