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

Why is JwtClaims.newBuilder() package private? #349

Closed
bastova opened this issue Sep 25, 2019 · 1 comment · Fixed by #350
Closed

Why is JwtClaims.newBuilder() package private? #349

bastova opened this issue Sep 25, 2019 · 1 comment · Fixed by #350
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bastova
Copy link

bastova commented Sep 25, 2019

I am trying to override the audience with my custom audience claim. I found the method jwtWithClaims in ServiceAccountJwtAccessCredentials. But this method seems useless because I can't actually create any JwtClaims since the builder is not accessible from outside package.

Environment details

  • OS: any
  • Java version: 1.8
  • google-auth-library-java version(s): 0.17.1

Steps to reproduce

Credentials credentials = ServiceAccountJwtAccessCredentials.fromStream(credsStream, URI.create(AUDIENCE)).jwtWithClaims(???);

How do I pass a JwtClaim into the ??? Or am I doing this wrong?

Stacktrace

Any relevant stacktrace here.

Code snippet

// I want to put something like 
Credentials credentials = ServiceAccountJwtAccessCredentials.fromStream(credsStream, URI.create(AUDIENCE)).jwtWithClaims(JwtClaims.newBuilder().withAudience(AUDIENCE).build());

External references such as API reference guides used

  • ?

Any additional information below

Following these steps will guarantee the quickest resolution possible.

Thanks!

@chingor13 chingor13 added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 25, 2019
@chingor13 chingor13 self-assigned this Sep 25, 2019
@chingor13
Copy link
Contributor

You're right, it should be public. We will fix and get a new version published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants