Skip to content

Commit

Permalink
Merge pull request #6 from lgaches/security
Browse files Browse the repository at this point in the history
rename variable
  • Loading branch information
lgaches committed Dec 11, 2023
2 parents bc22c97 + 2a717c1 commit f182c4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apns2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func main() {
certificatePath := flag.String("certificate-path", "", "Path to certificate file.")
authKeyPath := flag.String("authkey-path", "", "path to the P8 file. (Certificates, Identifiers & Profiles -> Keys)")
p8FilePath := flag.String("authkey-path", "", "path to the P8 file. (Certificates, Identifiers & Profiles -> Keys)")
keyID := flag.String("key-id", "", "Key ID from developer account (Certificates, Identifiers & Profiles -> Keys)")
teamID := flag.String("team-id", "", "Team ID from developer account (View Account -> Membership)")
topic := flag.String("topic", "", "The topic of the remote notification, which is typically the bundle ID for your app")
Expand All @@ -31,11 +31,11 @@ func main() {
log.Fatalf("Error retrieving certificate `%v`: %v", certificatePath, pemErr)
}
client = apns2.NewClient(cert)
} else if *authKeyPath != "" || *teamID != "" || *keyID != "" {
authKey, authErr := token.AuthKeyFromFile(*authKeyPath)
} else if *p8FilePath != "" || *teamID != "" || *keyID != "" {
authKey, authErr := token.AuthKeyFromFile(*p8FilePath)

if authErr != nil {
log.Fatalf("Error retrieving Token `%v`: %v", authKeyPath, authErr)
log.Fatalf("Error retrieving Token `%v`: %v", p8FilePath, authErr)
}

authToken := &token.Token{
Expand Down

0 comments on commit f182c4e

Please sign in to comment.