-
Notifications
You must be signed in to change notification settings - Fork 229
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
Making Credentials classes Serializable #67
Comments
One thing that's not clear to me from HttpServiceOptions is why it's necessary to have two layers of indirection, i.e. httpTransportFactoryClassName => httpTransportFactory => HttpTransport. |
We introduce an |
Ok, that makes sense. This seems like a reasonable approach and I'm personally fine with using it here (google-auth-library-java). |
I agree with adding this functionality to Credentials so that it can be used more broadly. There was no decision when this was originally created inconsistent with this. |
This was fixed in #69 |
In order for us to expose
google-auth-library-java
classes ingoogle-cloud-java
(thus dropping ourAuthCredentials
classes), we needCredentials
classes to be Serializable.One of the main obstacles to making
Credentials
classes serializable is that some of them contain anHttpTransport
field, which is not serializable (see ComputeEngineCredentials for instance).We faced this issue with our HttpServiceOptions classes and introduced the
HttpTransportFactory
interface:When serializing an option object we only transmit the class name for the transport factory and try to instantiate the factory from its classname upon deserialization.
Do you think something like this could be done for
Credentials
classes as well? Opinions are welcome./cc @anthmgoogle @garrettjonesgoogle @lesv
The text was updated successfully, but these errors were encountered: