The authentication always fails saying wrong password. When debugging into this issue more, it seems org.jboss.security.Base64Encoder#process(..) method is adding an line spacing(\n) at 76th character position.
The version of EAP I am using is 6.4.0. Is there any bug raised for this error? It seems like a bug to me!