@@ -939,8 +939,8 @@ protected String execute() throws FirebaseAuthException {
939
939
}
940
940
941
941
/**
942
- * Creates a new provider OIDC Auth config with the attributes contained in the specified {@link
943
- * OidcProviderConfig.CreateRequest}.
942
+ * Creates a new provider OIDC Auth provider config with the attributes contained in the specified
943
+ * {@link OidcProviderConfig.CreateRequest}.
944
944
*
945
945
* @param request A non-null {@link OidcProviderConfig.CreateRequest} instance.
946
946
* @return An {@link OidcProviderConfig} instance corresponding to the newly created provider
@@ -1042,7 +1042,8 @@ public OidcProviderConfig getOidcProviderConfig(@NonNull String providerId)
1042
1042
* {@link OidcProviderConfig} instance. If an error occurs while retrieving the provider
1043
1043
* config or if the specified provider ID does not exist, the future throws a
1044
1044
* {@link FirebaseAuthException}.
1045
- * @throws IllegalArgumentException If the provider ID string is null or empty.
1045
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not
1046
+ * prefixed with 'oidc.'.
1046
1047
*/
1047
1048
public ApiFuture <OidcProviderConfig > getOidcProviderConfigAsync (@ NonNull String providerId ) {
1048
1049
return getOidcProviderConfigOp (providerId ).callAsync (firebaseApp );
@@ -1051,7 +1052,7 @@ public ApiFuture<OidcProviderConfig> getOidcProviderConfigAsync(@NonNull String
1051
1052
private CallableOperation <OidcProviderConfig , FirebaseAuthException >
1052
1053
getOidcProviderConfigOp (final String providerId ) {
1053
1054
checkNotDestroyed ();
1054
- checkArgument (! Strings . isNullOrEmpty (providerId ), "Provider ID must not be null or empty." );
1055
+ OidcProviderConfig . checkOidcProviderId (providerId );
1055
1056
final FirebaseUserManager userManager = getUserManager ();
1056
1057
return new CallableOperation <OidcProviderConfig , FirebaseAuthException >() {
1057
1058
@ Override
@@ -1166,7 +1167,8 @@ public void deleteOidcProviderConfig(@NonNull String providerId) throws Firebase
1166
1167
* @return An {@code ApiFuture} which will complete successfully when the specified provider
1167
1168
* config has been deleted. If an error occurs while deleting the provider config, the future
1168
1169
* throws a {@link FirebaseAuthException}.
1169
- * @throws IllegalArgumentException If the provider ID string is null or empty.
1170
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not prefixed
1171
+ * with "oidc.".
1170
1172
*/
1171
1173
public ApiFuture <Void > deleteOidcProviderConfigAsync (String providerId ) {
1172
1174
return deleteOidcProviderConfigOp (providerId ).callAsync (firebaseApp );
@@ -1175,7 +1177,7 @@ public ApiFuture<Void> deleteOidcProviderConfigAsync(String providerId) {
1175
1177
private CallableOperation <Void , FirebaseAuthException > deleteOidcProviderConfigOp (
1176
1178
final String providerId ) {
1177
1179
checkNotDestroyed ();
1178
- checkArgument (! Strings . isNullOrEmpty (providerId ), "Provider ID must not be null or empty." );
1180
+ OidcProviderConfig . checkOidcProviderId (providerId );
1179
1181
final FirebaseUserManager userManager = getUserManager ();
1180
1182
return new CallableOperation <Void , FirebaseAuthException >() {
1181
1183
@ Override
@@ -1187,8 +1189,8 @@ protected Void execute() throws FirebaseAuthException {
1187
1189
}
1188
1190
1189
1191
/**
1190
- * Creates a new provider SAML Auth config with the attributes contained in the specified {@link
1191
- * SamlProviderConfig.CreateRequest}.
1192
+ * Creates a new provider SAML Auth provider config with the attributes contained in the specified
1193
+ * {@link SamlProviderConfig.CreateRequest}.
1192
1194
*
1193
1195
* @param request A non-null {@link SamlProviderConfig.CreateRequest} instance.
1194
1196
* @return An {@link SamlProviderConfig} instance corresponding to the newly created provider
@@ -1246,7 +1248,8 @@ public void deleteSamlProviderConfig(@NonNull String providerId) throws Firebase
1246
1248
* @return An {@code ApiFuture} which will complete successfully when the specified provider
1247
1249
* config has been deleted. If an error occurs while deleting the provider config, the future
1248
1250
* throws a {@link FirebaseAuthException}.
1249
- * @throws IllegalArgumentException If the provider ID string is null or empty.
1251
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not prefixed
1252
+ * with "saml.".
1250
1253
*/
1251
1254
public ApiFuture <Void > deleteSamlProviderConfigAsync (String providerId ) {
1252
1255
return deleteSamlProviderConfigOp (providerId ).callAsync (firebaseApp );
@@ -1255,7 +1258,7 @@ public ApiFuture<Void> deleteSamlProviderConfigAsync(String providerId) {
1255
1258
private CallableOperation <Void , FirebaseAuthException > deleteSamlProviderConfigOp (
1256
1259
final String providerId ) {
1257
1260
checkNotDestroyed ();
1258
- checkArgument (! Strings . isNullOrEmpty (providerId ), "Provider ID must not be null or empty." );
1261
+ SamlProviderConfig . checkSamlProviderId (providerId );
1259
1262
final FirebaseUserManager userManager = getUserManager ();
1260
1263
return new CallableOperation <Void , FirebaseAuthException >() {
1261
1264
@ Override
0 commit comments