@@ -946,6 +946,8 @@ protected String execute() throws FirebaseAuthException {
946
946
* @return An {@link OidcProviderConfig} instance corresponding to the newly created provider
947
947
* config.
948
948
* @throws NullPointerException if the provided request is null.
949
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not
950
+ * prefixed with 'oidc.'.
949
951
* @throws FirebaseAuthException if an error occurs while creating the provider config.
950
952
*/
951
953
public OidcProviderConfig createOidcProviderConfig (
@@ -961,6 +963,8 @@ public OidcProviderConfig createOidcProviderConfig(
961
963
* instance corresponding to the newly created provider config. If an error occurs while
962
964
* creating the provider config, the future throws a {@link FirebaseAuthException}.
963
965
* @throws NullPointerException if the provided request is null.
966
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not
967
+ * prefixed with 'oidc.'.
964
968
*/
965
969
public ApiFuture <OidcProviderConfig > createOidcProviderConfigAsync (
966
970
@ NonNull OidcProviderConfig .CreateRequest request ) {
@@ -971,6 +975,7 @@ public ApiFuture<OidcProviderConfig> createOidcProviderConfigAsync(
971
975
createOidcProviderConfigOp (final OidcProviderConfig .CreateRequest request ) {
972
976
checkNotDestroyed ();
973
977
checkNotNull (request , "Create request must not be null." );
978
+ OidcProviderConfig .checkOidcProviderId (request .getProviderId ());
974
979
final FirebaseUserManager userManager = getUserManager ();
975
980
return new CallableOperation <OidcProviderConfig , FirebaseAuthException >() {
976
981
@ Override
@@ -1025,7 +1030,8 @@ protected OidcProviderConfig execute() throws FirebaseAuthException {
1025
1030
*
1026
1031
* @param providerId A provider ID string.
1027
1032
* @return An {@link OidcProviderConfig} instance.
1028
- * @throws IllegalArgumentException If the provider ID string is null or empty.
1033
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not prefixed
1034
+ * with 'oidc'.
1029
1035
* @throws FirebaseAuthException If an error occurs while retrieving the provider config.
1030
1036
*/
1031
1037
public OidcProviderConfig getOidcProviderConfig (@ NonNull String providerId )
@@ -1153,7 +1159,8 @@ protected ListProviderConfigsPage<OidcProviderConfig> execute()
1153
1159
* Deletes the OIDC Auth provider config identified by the specified provider ID.
1154
1160
*
1155
1161
* @param providerId A provider ID string.
1156
- * @throws IllegalArgumentException If the provider ID string is null or empty.
1162
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not prefixed
1163
+ * with 'oidc'.
1157
1164
* @throws FirebaseAuthException If an error occurs while deleting the provider config.
1158
1165
*/
1159
1166
public void deleteOidcProviderConfig (@ NonNull String providerId ) throws FirebaseAuthException {
@@ -1196,6 +1203,8 @@ protected Void execute() throws FirebaseAuthException {
1196
1203
* @return An {@link SamlProviderConfig} instance corresponding to the newly created provider
1197
1204
* config.
1198
1205
* @throws NullPointerException if the provided request is null.
1206
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not prefixed
1207
+ * with 'saml'.
1199
1208
* @throws FirebaseAuthException if an error occurs while creating the provider config.
1200
1209
*/
1201
1210
public SamlProviderConfig createSamlProviderConfig (
@@ -1211,6 +1220,8 @@ public SamlProviderConfig createSamlProviderConfig(
1211
1220
* instance corresponding to the newly created provider config. If an error occurs while
1212
1221
* creating the provider config, the future throws a {@link FirebaseAuthException}.
1213
1222
* @throws NullPointerException if the provided request is null.
1223
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not prefixed
1224
+ * with 'saml'.
1214
1225
*/
1215
1226
public ApiFuture <SamlProviderConfig > createSamlProviderConfigAsync (
1216
1227
@ NonNull SamlProviderConfig .CreateRequest request ) {
@@ -1221,6 +1232,7 @@ public ApiFuture<SamlProviderConfig> createSamlProviderConfigAsync(
1221
1232
createSamlProviderConfigOp (final SamlProviderConfig .CreateRequest request ) {
1222
1233
checkNotDestroyed ();
1223
1234
checkNotNull (request , "Create request must not be null." );
1235
+ SamlProviderConfig .checkSamlProviderId (request .getProviderId ());
1224
1236
final FirebaseUserManager userManager = getUserManager ();
1225
1237
return new CallableOperation <SamlProviderConfig , FirebaseAuthException >() {
1226
1238
@ Override
@@ -1234,7 +1246,8 @@ protected SamlProviderConfig execute() throws FirebaseAuthException {
1234
1246
* Deletes the SAML Auth provider config identified by the specified provider ID.
1235
1247
*
1236
1248
* @param providerId A provider ID string.
1237
- * @throws IllegalArgumentException If the provider ID string is null or empty.
1249
+ * @throws IllegalArgumentException If the provider ID string is null or empty, or is not prefixed
1250
+ * with "saml.".
1238
1251
* @throws FirebaseAuthException If an error occurs while deleting the provider config.
1239
1252
*/
1240
1253
public void deleteSamlProviderConfig (@ NonNull String providerId ) throws FirebaseAuthException {
0 commit comments