GithubHelp home page GithubHelp logo

Comments (5)

garrettjonesgoogle avatar garrettjonesgoogle commented on July 18, 2024

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.

from google-auth-library-java.

mziccard avatar mziccard commented on July 18, 2024

HttpTransport implementations might have instance fields (see for instance NetHttpTransport.Builder). So while you could serialize them just using the class name and a no-arg constructor the deserialized transport could have have a different behavior (e.g. missing a proxy configuration).

We introduce an HttpTransportFactory and document that it should have a no-arg costructor so we can serialize it just using only the classname. To HttpTransportFactory we can add proper documentation and it's reasonable to assume/require that a factory has no instance fields and an empty constructor.

from google-auth-library-java.

garrettjonesgoogle avatar garrettjonesgoogle commented on July 18, 2024

Ok, that makes sense. This seems like a reasonable approach and I'm personally fine with using it here (google-auth-library-java).

from google-auth-library-java.

anthmgoogle avatar anthmgoogle commented on July 18, 2024

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.

from google-auth-library-java.

mziccard avatar mziccard commented on July 18, 2024

This was fixed in #69

from google-auth-library-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.