Skip to content

Extract FID from FIS createInstallation response #888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 14, 2019
Merged

Conversation

ankitaj224
Copy link
Contributor

No description provided.

@ankitaj224 ankitaj224 requested a review from andirayo October 8, 2019 23:17
@googlebot googlebot added the cla: yes Override cla label Oct 8, 2019
@ankitaj224
Copy link
Contributor Author

/test check-changed

@ankitaj224
Copy link
Contributor Author

/test new-smoke-tests

@@ -117,6 +118,16 @@
.setRegistrationStatus(PersistedFid.RegistrationStatus.UNREGISTERED)
.build();

private static final PersistedFidEntry INVALID_FID_ENTRY =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the feeling we talked about this multiple times already and thus please feel free to ignore:
Why is this not called PersistedInstallationEntry or something.
Since the data stored identifies the Firebase Installation as a whole, i.e. contains the Installation's FID, registration-status, it's Refresh-Token and latest Auth-Token...

Please ignore if we have discussed this already in the past.
I'm also happy to talk in person if you prefer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we have. I acknowledged the comments and changed to PersistedFidEntry. I can change it to 'PersistedInstallationEntry' once more as per your suggestion. But will do that as part of another PR to contain the scope of the current PR.

Comment on lines +124 to +127
.setAuthToken("")
.setRefreshToken("")
.setTokenCreationEpochInSecs(TEST_CREATION_TIMESTAMP_1)
.setExpiresInSecs(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that this is an object (or a proto), can we create a class (or proto) for Auth-Token that has the fields "token", "creationTimestamp", "expirationTimestamp" or "expiresIn", so that the fields that belong together are part of the same object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change but IMO dont see much benefit. This object is used to represent persisted fid & metadata - simpler the class, easier it is to read and write.

Objects that are exposed to users have been separated out into a class (or proto) for Auth-Token & a class for firebase installation. This addresses your comment & is useful to segregate the details to the clients.

@ankitaj224
Copy link
Contributor Author

/retest

@ankitaj224
Copy link
Contributor Author

/retest

@ankitaj224
Copy link
Contributor Author

/restest

@ankitaj224
Copy link
Contributor Author

/retest

@ankitaj224
Copy link
Contributor Author

/test new-smoke-tests

@ankitaj224
Copy link
Contributor Author

/test device-check-changed

@ankitaj224 ankitaj224 merged commit 1d51edf into listeners Oct 14, 2019
@ankitaj224 ankitaj224 deleted the extractFid branch October 14, 2019 18:39
ankitaj224 added a commit that referenced this pull request Oct 14, 2019
* Fixing FISClient to correctly parse expiration timestamp. (#848)

* Updating getAuthToken to return creation timestamp (#884)

* Propagating the exceptions to the clients. (#856)

* Extract FID from FIS createInstallation response (#888)

* Addressing Rayo's comment: Rename PersistedFidEntry to (#899)

* Implementing retry once for FIS Client. (#895)

* Simplifying FirebaseInstallations class by adding listeners. (#847)

* Fixing FISClient to correctly parse expiration timestamp. (#848)

* Updating getAuthToken to return creation timestamp (#884)

* Propagating the exceptions to the clients. (#856)
@firebase firebase locked and limited conversation to collaborators Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants