Skip to content

Commit cf543ff

Browse files
committed
Firebase Cloud Messaging API (#81)
* Adding Firebase Cloud Messaging (#62) * initial commit for adding Firebase Cloud Messaging * add validator * use http const in messaging test * add client version header for stats * init integration test * add integration test (validated on IOS today) * add comment with URL to enable Firebase Cloud Messaging API * fix broken test * add integration tests * accept a Message instead of RequestMessage + and rename method + send / sendDryRun * update fcm url * rollback url endpoint * fix http constants, change responseMessage visibility, change map[string]interface{} as map[string]string * fix http constants * fix integration tests * fix APNS naming * add validators * Added APNS types; Updated tests * Added more tests; Fixed APNS serialization * Updated documentation * Improved error handling inFCM * Added utils file * Updated integration tests * Implemented topic management operations * Added integration tests * Updated CHANGELOG * Addressing code review comments * Supporting 0 valued Aps.Badge * Addressing some review comments * Removed some unused vars * Accepting prefixed topic names (#84) * Accepting prefixed topic named * Added a comment * Using new FCM error codes (#89)
1 parent d388cd8 commit cf543ff

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,21 @@
4141

4242
### Authentication
4343

44+
- [added] A new [`VerifyIDTokenAndCheckRevoked()`](https://godoc.org/firebase.google.com/go/auth#Client.VerifyIDToken)
45+
function has been added to check for revoked ID tokens.
46+
- [added] A new [`RevokeRefreshTokens()`](https://godoc.org/firebase.google.com/go/auth#Client.RevokeRefreshTokens)
47+
function has been added to invalidate all refresh tokens issued to a user.
48+
- [added] A new property `TokensValidAfterMillis` has been added to the
49+
['UserRecord'](https://godoc.org/firebase.google.com/go/auth#UserRecord)
50+
type, which stores the time of the revocation truncated to 1 second accuracy.
51+
52+
### Cloud Messaging
53+
54+
- [feature] Added the `messaging` package for sending Firebase notifications
55+
and managing topic subscriptions.
56+
57+
### Authentication
58+
4459
- [added] A new [`VerifyIDTokenAndCheckRevoked()`](https://godoc.org/firebase.google.com/go/auth#Client.VerifyIDToken)
4560
function has been added to check for revoked ID tokens.
4661
- [added] A new [`RevokeRefreshTokens()`](https://godoc.org/firebase.google.com/go/auth#Client.RevokeRefreshTokens)

internal/internal.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ type MockTokenSource struct {
102102
AccessToken string
103103
}
104104

105+
// MessagingConfig represents the configuration of Firebase Cloud Messaging service.
106+
type MessagingConfig struct {
107+
Opts []option.ClientOption
108+
ProjectID string
109+
Version string
110+
}
111+
105112
// Token returns the test token associated with the TokenSource.
106113
func (ts *MockTokenSource) Token() (*oauth2.Token, error) {
107114
return &oauth2.Token{AccessToken: ts.AccessToken}, nil

0 commit comments

Comments
 (0)