Skip to content

Commit 3a77897

Browse files
authored
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 5805fca commit 3a77897

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
@@ -1061,6 +1061,22 @@ protected OidcProviderConfig execute() throws FirebaseAuthException {
10611061
};
10621062
}
10631063

1064+
/**
1065+
* Gets a page of OIDC Auth provider configs starting from the specified {@code pageToken}. Page
1066+
* size will be limited to 100 provider configs.
1067+
*
1068+
* @param pageToken A non-empty page token string, or null to retrieve the first page of provider
1069+
* configs.
1070+
* @return A {@link ListProviderConfigsPage} instance.
1071+
* @throws IllegalArgumentException If the specified page token is empty
1072+
* @throws FirebaseAuthException If an error occurs while retrieving provider config data.
1073+
*/
1074+
public ListProviderConfigsPage<OidcProviderConfig> listOidcProviderConfigs(
1075+
@Nullable String pageToken) throws FirebaseAuthException {
1076+
int maxResults = FirebaseUserManager.MAX_LIST_PROVIDER_CONFIGS_RESULTS;
1077+
return listOidcProviderConfigsOp(pageToken, maxResults).call();
1078+
}
1079+
10641080
/**
10651081
* Gets a page of OIDC Auth provider configs starting from the specified {@code pageToken}.
10661082
*
@@ -1071,7 +1087,7 @@ protected OidcProviderConfig execute() throws FirebaseAuthException {
10711087
* @return A {@link ListProviderConfigsPage} instance.
10721088
* @throws IllegalArgumentException If the specified page token is empty, or max results value is
10731089
* invalid.
1074-
* @throws FirebaseAuthException If an error occurs while retrieving user data.
1090+
* @throws FirebaseAuthException If an error occurs while retrieving provider config data.
10751091
*/
10761092
public ListProviderConfigsPage<OidcProviderConfig> listOidcProviderConfigs(
10771093
@Nullable String pageToken, int maxResults) throws FirebaseAuthException {
@@ -1091,9 +1107,8 @@ public ListProviderConfigsPage<OidcProviderConfig> listOidcProviderConfigs(
10911107
*/
10921108
public ApiFuture<ListProviderConfigsPage<OidcProviderConfig>> listOidcProviderConfigsAsync(
10931109
@Nullable String pageToken) {
1094-
return listOidcProviderConfigsAsync(
1095-
pageToken,
1096-
FirebaseUserManager.MAX_LIST_PROVIDER_CONFIGS_RESULTS);
1110+
int maxResults = FirebaseUserManager.MAX_LIST_PROVIDER_CONFIGS_RESULTS;
1111+
return listOidcProviderConfigsAsync(pageToken, maxResults);
10971112
}
10981113

10991114
/**

0 commit comments

Comments
 (0)