GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Adding a createFromFile method to AuthCredentials · Issue #179 · googleapis/google-cloud-java

Adding a createFromFile method to AuthCredentials #179

New issue
Copy link
New issue
Copy link
Closed
Closed
Adding a createFromFile method to AuthCredentials#179
Copy link
Assignees
mziccard
Labels
api: coretype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@mziccard
mziccard
opened on Sep 24, 2015
Issue body actions

We now have a createFor(String account, PrivateKey privateKey) to create AuthCredentials, what about adding a createFor(File) for creating AuthCredentials from a service account JSON file?

Notably GoogleCredential already has fromStream that reads credentials from a stream of the JSON file. If you prefer, we can go for createFor(Stream) rather than createFor(File).

Activity

  1. mziccard
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    api: core
    on Sep 24, 2015
  2. aozarov commented on Sep 24, 2015

    @aozarov
    aozarov
    on Sep 24, 2015
    Contributor
    More actions

    I would definitely prefer createFor(stream) rather than createFor(File) as the latter is not supported in some systems (such as AE).

    Do you think this issue is a dup of #3?

    In any case, I think if we add it it should only support a json content (so maybe method name should state it).

    The reasons I don't think we should support p12 in this method are:

    • User can change their password (so we need to ask for that).
    • I am not sure we can extract the service_acount from it.
    • Seems to be deprecated.
  3. mziccard commented on Sep 24, 2015

    @mziccard
    mziccard
    on Sep 24, 2015
    ContributorAuthor
    More actions

    Ooops sorry I missed #3. Yes this is a duplicate :(

    I prefer createFor(stream) as well as it supports more uses. And I also agree that we can live without P12:

    • AFAIK it does not contain service_account information
    • It is supported just for backward compatibility with code that already used P12

    GoogleCredential.createFor also supports only JSON format and states it in the javadoc. If you want to be more precise we can name it createForJson() but it kind of breaks the naming convention.

  4. aozarov commented on Sep 24, 2015

    @aozarov
    aozarov
    on Sep 24, 2015
    Contributor
    More actions

    We already have createForComputeEngine and createForAppngine.

    I am fine with createFor(Stream jsonStream) or createForJson(Stream) and a good javadoc
    that is pointing to the public docs (such as this one).

  5. mziccard commented on Sep 25, 2015

    @mziccard
    mziccard
    on Sep 25, 2015
    ContributorAuthor
    More actions

    Closed with #180.

  6. mziccard
    closed this as completedon Sep 25, 2015
  7. JustinBeckwith
    assigned
    mziccard
    on Feb 1, 2021
  8. github-actions
    added 6 commits that reference this issue on Jun 21, 2022

    chore: Integrate new gapic-generator-java and rules_gapic (#179)

    bcbec82

    chore: include generated samples dir (#179)

    cc6d3a4

    chore(main): release 1.2.1 (#179)

    6fa45ca

    chore(deps): update dependency com.google.cloud.samples:shared-config…

    255a478

    chore: Re-generated to pick up changes from synthtool. (#179)

    dc62dcf

    ci: removing clirr from required checks (#179)

    f35e8f7
  9. github-actions
    added a commit that references this issue on Jul 14, 2022

    build(deps): update dependency com.google.cloud:google-cloud-shared-c…

    848c500
  10. github-actions
    added a commit that references this issue on Aug 16, 2022

    chore(deps): update dependency com.google.cloud:google-cloud-storage-…

    a351a94
  11. github-actions
    added 3 commits that reference this issue on Sep 30, 2022

    deps: update dependency certifi to v2022.9.24 (#179)

    684c965

    chore(main): release 1.1.7 (#187)

    f4d027a

    chore(main): release 1.3.0 (#172)

    f6cf47b
  12. chingor13
    added a commit that references this issue on Jan 22, 2026

    chore: update client_documentation link (#179)

    a551271
  13. chingor13
    added a commit that references this issue on Feb 24, 2026

    Release v0.11.0 (#179)

    64435cf
  14. chingor13
    added a commit that references this issue on Mar 12, 2026

    Release v0.11.0 (#179)

    e2d6f28
  15. suztomo
    added a commit that references this issue on Mar 30, 2026

    fix: move autovalue to annotation processor path (#179)

    3d874fb
  16. lqiu96
    added a commit that references this issue on Apr 1, 2026

    fix: move autovalue to annotation processor path (#179)

    1483caf
  17. benjaminp
    added a commit that references this issue on Jul 13, 2026

    deps: update dependency com.google.cloud:google-cloud-core-bom to v1.…

    a766f11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @mziccard
    mziccard

Labels

api: coretype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.