But it treats Authentication as the class, so getName() returns org.activiti.engine.impl.identity.Authentication and getCredentials() fails to run. I tried using authentication.getName() but that results in a 'No such property: authentication for class...' error.
Re: Get currently authenticated user in Activiti Script Task
Assuming you are referring to Alfresco Process Service, you cannot decode a password back, it is a one way algorithm. Alfresco Process Services use PasswordEncoder (Spring Security 4.0.1.RELEASE API) to encode the password and as you can see the only options are to match the stored password (if you know it) or encode a new raw password.
If you want to get the current logged in user, please use