I want to write some data to AEM, and the below code works fine for me in AEM 6.0 but not in AEM 6.1 , always throws a Login Exception as follows:
\"Login Except
Also, if you are planning a future migration to AEM 6.2, consider using ACS Commons to facilitate the creation and availability of system users. It eliminates all this manual process which can be error-prone.
https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-service-users/index.html