Skip to content

Commit 36c27be

Browse files
committed
Add missing listOidcProviderConfigs method. (#406)
Each asynchronous method is supposed to have a synchronous counterpart. This was supposed to be included when I initially added the operation to list OIDC provider configs.
1 parent 580eedd commit 36c27be

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

src/main/java/com/google/firebase/auth/AbstractFirebaseAuth.java

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,22 @@ protected OidcProviderConfig execute() throws FirebaseAuthException {
11981198
};
11991199
}
12001200

1201+
/**
1202+
* Gets a page of OIDC Auth provider configs starting from the specified {@code pageToken}. Page
1203+
* size will be limited to 100 provider configs.
1204+
*
1205+
* @param pageToken A non-empty page token string, or null to retrieve the first page of provider
1206+
* configs.
1207+
* @return A {@link ListProviderConfigsPage} instance.
1208+
* @throws IllegalArgumentException If the specified page token is empty
1209+
* @throws FirebaseAuthException If an error occurs while retrieving provider config data.
1210+
*/
1211+
public ListProviderConfigsPage<OidcProviderConfig> listOidcProviderConfigs(
1212+
@Nullable String pageToken) throws FirebaseAuthException {
1213+
int maxResults = FirebaseUserManager.MAX_LIST_PROVIDER_CONFIGS_RESULTS;
1214+
return listOidcProviderConfigsOp(pageToken, maxResults).call();
1215+
}
1216+
12011217
/**
12021218
* Gets a page of OIDC Auth provider configs starting from the specified {@code pageToken}.
12031219
*
@@ -1208,7 +1224,7 @@ protected OidcProviderConfig execute() throws FirebaseAuthException {
12081224
* @return A {@link ListProviderConfigsPage} instance.
12091225
* @throws IllegalArgumentException If the specified page token is empty, or max results value is
12101226
* invalid.
1211-
* @throws FirebaseAuthException If an error occurs while retrieving user data.
1227+
* @throws FirebaseAuthException If an error occurs while retrieving provider config data.
12121228
*/
12131229
public ListProviderConfigsPage<OidcProviderConfig> listOidcProviderConfigs(
12141230
@Nullable String pageToken, int maxResults) throws FirebaseAuthException {
@@ -1228,9 +1244,8 @@ public ListProviderConfigsPage<OidcProviderConfig> listOidcProviderConfigs(
12281244
*/
12291245
public ApiFuture<ListProviderConfigsPage<OidcProviderConfig>> listOidcProviderConfigsAsync(
12301246
@Nullable String pageToken) {
1231-
return listOidcProviderConfigsAsync(
1232-
pageToken,
1233-
FirebaseUserManager.MAX_LIST_PROVIDER_CONFIGS_RESULTS);
1247+
int maxResults = FirebaseUserManager.MAX_LIST_PROVIDER_CONFIGS_RESULTS;
1248+
return listOidcProviderConfigsAsync(pageToken, maxResults);
12341249
}
12351250

12361251
/**

0 commit comments

Comments
 (0)