Skip to content
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

Allow passing InputStream for service account #18

Closed
iamareebjamal opened this issue Dec 28, 2017 · 6 comments
Closed

Allow passing InputStream for service account #18

iamareebjamal opened this issue Dec 28, 2017 · 6 comments
Assignees

Comments

@iamareebjamal
Copy link

iamareebjamal commented Dec 28, 2017

Currently, only File is allowed to send to the PushRaven API

If the user is loading the JSON from environment variables, it is not feasible or secure to save that to a file and then provide to PushRaven

Secondly, files are not present in ephemeral file systems provided by services like Google App Engine and Heroku

Thirdly, a developer could have also loaded GoogleCredentials for personal use of Firebase in his app and reloading the InputStream for the same purpose inside Pushraven would be somewhat unnecessary

@Raudius
Copy link
Owner

Raudius commented Dec 29, 2017

Seems reasonable. Will add this to the next release.

Do you also know if GoogleAuth tokens are reusable? And to what point?

As it stands Pushraven is making a new auth token for each push.

@Raudius Raudius self-assigned this Dec 29, 2017
@iamareebjamal
Copy link
Author

Yes they are reusable but calling getAccessToken is idempotent as it itself reuses the non-expired tokens and automatically refreshes them when expired so it is better to not cache it in the library itself

@Joni-Aaltonen
Copy link

Any news on the next release, would love to see this feature in

@Raudius
Copy link
Owner

Raudius commented Mar 15, 2019

Done! Thanks for the reminder!

It might take a few hours to get published on Maven Central.

You can find the jars in the Github release: https://github.com/Raudius/Pushraven/releases/tag/v2.1.0.2

@Raudius
Copy link
Owner

Raudius commented Mar 15, 2019

You can now set the GoogleCredential object directly through the static method:

GoogleCredential gcred = new GoogleCredential();
Pushraven.setCredential(gcred);

@Raudius Raudius closed this as completed Mar 15, 2019
@Joni-Aaltonen
Copy link

Great thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants