Open gkovbasenko opened 7 years ago
I don't fully understand why this change is needed, can you elaborate, please? Also, I don't think we should log the secret out.
Hi, I have done this changes, since even after adding default constructor for the RequestToken, I keep getting error:
[error] m.plugin - An error has occured while getting the value from memcached. ct=Any java.util.concurrent.ExecutionException: java.io.InvalidClassException: com.feth.play.module.pa.providers.oauth1.OAuth1AuthProvider$SerializableRequestToken; no valid constructor at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_31] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[na:1.8.0_31] at net.spy.memcached.transcoders.TranscodeService$Task.get(TranscodeService.java:97) ~[AmazonElastiCacheClusterClient-1.0.0.jar:1.0.0] at net.spy.memcached.internal.GetFuture.get(GetFuture.java:63) ~[AmazonElastiCacheClusterClient-1.0.0.jar:1.0.0] at com.github.mumoshu.play2.memcached.MemcachedCacheApi.get(MemcachedCacheApi.scala:42) ~[play2-memcached-play24_2.11-0.7.0.jar:0.7.0] Caused by: java.io.InvalidClassException: com.feth.play.module.pa.providers.oauth1.OAuth1AuthProvider$SerializableRequestToken; no valid constructor at java.io.ObjectStreamClass$ExceptionInfo.newInvalidClassException(ObjectStreamClass.java:150) ~[na:1.8.0_31] at java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:768) ~[na:1.8.0_31] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775) ~[na:1.8.0_31] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_31] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371) ~[na:1.8.0_31]
So I have added additional class, which is non-Serialazable with empty constructor. After this I have got an error that class is serialazable, but contains empty details. That's why I load from the cache SerializableRequestToken instead of RequestToken. After all these changes, login with LinkedId account on our system was successful.
I might miss to remove logs. Let me check and push code without them.