Skip to content

Add missing listOidcProviderConfigs method. #406

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

Merged
merged 1 commit into from
May 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions src/main/java/com/google/firebase/auth/AbstractFirebaseAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,22 @@ protected OidcProviderConfig execute() throws FirebaseAuthException {
};
}

/**
* Gets a page of OIDC Auth provider configs starting from the specified {@code pageToken}. Page
* size will be limited to 100 provider configs.
*
* @param pageToken A non-empty page token string, or null to retrieve the first page of provider
* configs.
* @return A {@link ListProviderConfigsPage} instance.
* @throws IllegalArgumentException If the specified page token is empty
* @throws FirebaseAuthException If an error occurs while retrieving provider config data.
*/
public ListProviderConfigsPage<OidcProviderConfig> listOidcProviderConfigs(
@Nullable String pageToken) throws FirebaseAuthException {
int maxResults = FirebaseUserManager.MAX_LIST_PROVIDER_CONFIGS_RESULTS;
return listOidcProviderConfigsOp(pageToken, maxResults).call();
}

/**
* Gets a page of OIDC Auth provider configs starting from the specified {@code pageToken}.
*
Expand All @@ -1071,7 +1087,7 @@ protected OidcProviderConfig execute() throws FirebaseAuthException {
* @return A {@link ListProviderConfigsPage} instance.
* @throws IllegalArgumentException If the specified page token is empty, or max results value is
* invalid.
* @throws FirebaseAuthException If an error occurs while retrieving user data.
* @throws FirebaseAuthException If an error occurs while retrieving provider config data.
*/
public ListProviderConfigsPage<OidcProviderConfig> listOidcProviderConfigs(
@Nullable String pageToken, int maxResults) throws FirebaseAuthException {
Expand All @@ -1091,9 +1107,8 @@ public ListProviderConfigsPage<OidcProviderConfig> listOidcProviderConfigs(
*/
public ApiFuture<ListProviderConfigsPage<OidcProviderConfig>> listOidcProviderConfigsAsync(
@Nullable String pageToken) {
return listOidcProviderConfigsAsync(
pageToken,
FirebaseUserManager.MAX_LIST_PROVIDER_CONFIGS_RESULTS);
int maxResults = FirebaseUserManager.MAX_LIST_PROVIDER_CONFIGS_RESULTS;
return listOidcProviderConfigsAsync(pageToken, maxResults);
}

/**
Expand Down