Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9f40bc7

Browse filesBrowse files
authored
Overload GoogleCredentials.createScoped with variadic arguments (#218)
* Add variadic overload of GoogleCredentials.createScoped * Remove unused import
1 parent a1bbc4f commit 9f40bc7
Copy full SHA for 9f40bc7

1 file changed

+11Lines changed: 11 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java‎

Copy file name to clipboardExpand all lines: oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,17 @@ public GoogleCredentials createScoped(Collection<String> scopes) {
227227
return this;
228228
}
229229

230+
/**
231+
* If the credentials support scopes, creates a copy of the the identity with the specified
232+
* scopes; otherwise, returns the same instance.
233+
*
234+
* @param scopes Collection of scopes to request.
235+
* @return GoogleCredentials with requested scopes.
236+
*/
237+
public GoogleCredentials createScoped(String... scopes) {
238+
return createScoped(scopes);
239+
}
240+
230241
/**
231242
* If the credentials support domain-wide delegation, creates a copy
232243
* of the identity so that it impersonates the specified user;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.