-
Notifications
You must be signed in to change notification settings - Fork 386
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
fix: deprecate the createScopedRequired
methods
#410
Conversation
Codecov Report
@@ Coverage Diff @@
## master #410 +/- ##
==========================================
+ Coverage 94.87% 95.15% +0.28%
==========================================
Files 15 15
Lines 956 970 +14
Branches 217 217
==========================================
+ Hits 907 923 +16
+ Misses 49 47 -2
Continue to review full report at Codecov.
|
gentle ping @google/google-node-team @google/yoshi-nodejs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM w/ nits.
src/auth/jwtclient.ts
Outdated
/** | ||
* Determine if there are currently scopes available. | ||
*/ | ||
protected hasScopes() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -40,6 +42,7 @@ export class IAMAuth { | |||
*/ | |||
createScopedRequired() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
].join(' ') | ||
}; | ||
|
||
export const JWT_CREATE_SCOPED_DEPRECATED = { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
BREAKING CHANGE: The
createScopedRequired
method has been deprecated on multiple classes. ThecreateScopedRequired
andcreateScoped
methods on theJWT
class were largely in place to help inform clients when scopes were required in an application default credential scenario. Instead of checking if scopes are required after creating the client, instead scopes should just be passed either into theGoogleAuth.getClient
method, or directly into theJWT
constructor.Old code
New code