diff --git a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/IntrospectCodeApiServiceImpl.java b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/IntrospectCodeApiServiceImpl.java index b481e81ce4..192bad27b4 100644 --- a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/IntrospectCodeApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/IntrospectCodeApiServiceImpl.java @@ -1,19 +1,17 @@ /* - * Copyright (c) 2020-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * WSO2 LLC. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.wso2.carbon.identity.user.endpoint.impl; @@ -24,15 +22,17 @@ import org.wso2.carbon.identity.recovery.IdentityRecoveryException; import org.wso2.carbon.identity.recovery.model.UserRecoveryData; import org.wso2.carbon.identity.recovery.signup.UserSelfRegistrationManager; -import org.wso2.carbon.identity.user.endpoint.Constants; -import org.wso2.carbon.identity.user.endpoint.IntrospectCodeApiService; -import org.wso2.carbon.identity.user.endpoint.dto.CodeValidateInfoResponseDTO; +import org.wso2.carbon.identity.user.endpoint.*; +import org.wso2.carbon.identity.user.endpoint.dto.*; + + import org.wso2.carbon.identity.user.endpoint.dto.CodeValidationRequestDTO; -import org.wso2.carbon.identity.user.endpoint.dto.VerifiedChannelDTO; -import org.wso2.carbon.identity.user.endpoint.util.Utils; +import org.wso2.carbon.identity.user.endpoint.dto.CodeValidateInfoResponseDTO; import java.util.HashMap; +import org.wso2.carbon.identity.user.endpoint.util.Utils; + import javax.ws.rs.core.Response; import static org.wso2.carbon.identity.user.endpoint.util.Utils.getCodeIntrospectResponse; diff --git a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/LiteApiServiceImpl.java b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/LiteApiServiceImpl.java index a1a0de0bc4..1745d89e27 100644 --- a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/LiteApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/LiteApiServiceImpl.java @@ -1,27 +1,25 @@ /* - * Copyright (c) 2020-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * WSO2 LLC. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - package org.wso2.carbon.identity.user.endpoint.impl; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.base.MultitenantConstants; +import org.wso2.carbon.identity.recovery.model.Property; import org.wso2.carbon.identity.application.common.model.User; import org.wso2.carbon.identity.core.util.IdentityUtil; import org.wso2.carbon.identity.event.IdentityEventException; @@ -31,14 +29,13 @@ import org.wso2.carbon.identity.recovery.IdentityRecoveryException; import org.wso2.carbon.identity.recovery.bean.NotificationResponseBean; import org.wso2.carbon.identity.recovery.confirmation.ResendConfirmationManager; -import org.wso2.carbon.identity.recovery.model.Property; import org.wso2.carbon.identity.recovery.signup.UserSelfRegistrationManager; import org.wso2.carbon.identity.user.endpoint.Constants; import org.wso2.carbon.identity.user.endpoint.LiteApiService; -import org.wso2.carbon.identity.user.endpoint.dto.LiteUserRegistrationRequestDTO; -import org.wso2.carbon.identity.user.endpoint.dto.PropertyDTO; +import org.wso2.carbon.identity.user.endpoint.dto.*; + import org.wso2.carbon.identity.user.endpoint.dto.SuccessfulUserCreationDTO; -import org.wso2.carbon.identity.user.endpoint.dto.SuccessfulUserCreationExternalResponseDTO; + import org.wso2.carbon.identity.user.endpoint.util.Utils; import java.util.ArrayList; diff --git a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/MeApiServiceImpl.java b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/MeApiServiceImpl.java index b35a6979de..6516a669eb 100644 --- a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/MeApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/MeApiServiceImpl.java @@ -1,20 +1,20 @@ /* - * Copyright (c) 2016-2024, WSO2 LLC. (http://www.wso2.com). * - * WSO2 LLC. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.wso2.carbon.identity.user.endpoint.impl; import org.apache.commons.lang.StringUtils; @@ -30,6 +30,7 @@ import org.wso2.carbon.identity.recovery.RecoverySteps; import org.wso2.carbon.identity.recovery.bean.NotificationResponseBean; import org.wso2.carbon.identity.recovery.confirmation.ResendConfirmationManager; +import org.wso2.carbon.identity.recovery.exception.SelfRegistrationException; import org.wso2.carbon.identity.recovery.model.UserRecoveryData; import org.wso2.carbon.identity.recovery.signup.UserSelfRegistrationManager; import org.wso2.carbon.identity.user.endpoint.Constants; @@ -51,7 +52,6 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; - import javax.ws.rs.core.Response; import static org.wso2.carbon.identity.recovery.IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_BAD_SELF_REGISTER_REQUEST; diff --git a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/PiInfoApiServiceImpl.java b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/PiInfoApiServiceImpl.java index a786a86bb0..464bd39846 100644 --- a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/PiInfoApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/PiInfoApiServiceImpl.java @@ -1,7 +1,7 @@ /* - * Copyright (c) 2018-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * WSO2 LLC. licenses this file to you under the Apache License, + * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at @@ -15,6 +15,7 @@ * specific language governing permissions and limitations * under the License. */ + package org.wso2.carbon.identity.user.endpoint.impl; import org.wso2.carbon.identity.user.endpoint.PiInfoApiService; @@ -28,7 +29,6 @@ import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.Map; - import javax.ws.rs.core.Response; /** diff --git a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ResendCodeApiServiceImpl.java b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ResendCodeApiServiceImpl.java index bda85888ae..f74188b799 100644 --- a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ResendCodeApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ResendCodeApiServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2016, WSO2 LLC. (http://www.wso2.com). * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -44,7 +44,6 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; - import javax.ws.rs.core.Response; /** diff --git a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/UpdateUsernameApiServiceImpl.java b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/UpdateUsernameApiServiceImpl.java index 30ef92d6ee..b6bca30184 100644 --- a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/UpdateUsernameApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/UpdateUsernameApiServiceImpl.java @@ -1,7 +1,7 @@ /* - * Copyright (c) 2018-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * WSO2 LLC. licenses this file to you under the Apache License, + * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at @@ -15,6 +15,7 @@ * specific language governing permissions and limitations * under the License. */ + package org.wso2.carbon.identity.user.endpoint.impl; import org.apache.commons.lang.StringUtils; @@ -32,7 +33,6 @@ import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import java.util.Optional; - import javax.ws.rs.core.Response; import static org.wso2.carbon.identity.user.rename.core.constants.UsernameUpdateServiceConstants.Error.ERROR_UNEXPECTED; @@ -51,6 +51,7 @@ public class UpdateUsernameApiServiceImpl extends UpdateUsernameApiService { public Response updateUsernamePut(UsernameUpdateRequestDTO user) { try { + UserDTO userDTO = new UserDTO(); userDTO.setExistingUsername(user.getExistingUsername()); userDTO.setNewUsername(user.getNewUsername()); diff --git a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ValidateUsernameApiServiceImpl.java b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ValidateUsernameApiServiceImpl.java index 8633652efd..dc7b8ea5c9 100644 --- a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ValidateUsernameApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ValidateUsernameApiServiceImpl.java @@ -1,19 +1,17 @@ /* - * Copyright (c) 2018-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * WSO2 LLC. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.wso2.carbon.identity.user.endpoint.impl; @@ -42,9 +40,8 @@ import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import org.wso2.carbon.utils.multitenancy.MultitenantUtils; -import java.util.List; - import javax.ws.rs.core.Response; +import java.util.List; public class ValidateUsernameApiServiceImpl extends ValidateUsernameApiService { diff --git a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/util/Utils.java b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/util/Utils.java index b5d1fea1b6..89b902f071 100644 --- a/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/util/Utils.java +++ b/components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/util/Utils.java @@ -23,6 +23,7 @@ import org.slf4j.MDC; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.common.model.User; +import org.wso2.carbon.identity.auth.attribute.handler.model.ValidationFailureReason; import org.wso2.carbon.identity.core.util.IdentityUtil; import org.wso2.carbon.identity.recovery.IdentityRecoveryException; import org.wso2.carbon.identity.recovery.RecoveryScenarios;