-
Bug
-
Resolution: Done
-
Major
-
PLINK_2.5.2.FInal
-
None
This is evident in the social login with twitter quickstart (PLINK-325).
You are redirected to twitter. Now if you have already logged into twitter, it asks whether you want to approve the app. If you click ok, the redirect back happens perfectly.
Now when the redirect to twitter happens and if you are not already logged in but need to do a fresh login then, there is an exception as follows:
=======================================
09:55:24,506 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jboss-as-picketlink-authentication-twitter].[default]] (http-/127.0.0.1:8080-2) JBWEB000236: Servlet.service() for servlet default threw exception: org.picketlink.authentication.AuthenticationException: Authentication failed.
at org.picketlink.internal.DefaultIdentity.authenticate(DefaultIdentity.java:190) [picketlink-impl-2.5.0.Final.jar:]
at org.picketlink.internal.DefaultIdentity.login(DefaultIdentity.java:102) [picketlink-impl-2.5.0.Final.jar:]
at org.picketlink.internal.DefaultIdentity$Proxy$$$_WeldClientProxy.login(DefaultIdentity$Proxy$$$_WeldClientProxy.java) [picketlink-impl-2.5.0.Final.jar:]
at org.jboss.as.quickstarts.picketlink.authentication.twitter.TwitterFilter.doFilter(TwitterFilter.java:54) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
Caused by: java.lang.IllegalStateException: No Token available.
at twitter4j.auth.OAuthAuthorization.ensureTokenIsAvailable(OAuthAuthorization.java:77) [twitter4j-core-3.0.3.jar:3.0.3]
at twitter4j.auth.OAuthAuthorization.getOAuthAccessToken(OAuthAuthorization.java:144) [twitter4j-core-3.0.3.jar:3.0.3]
at twitter4j.auth.OAuthAuthorization.getOAuthAccessToken(OAuthAuthorization.java:165) [twitter4j-core-3.0.3.jar:3.0.3]
at twitter4j.TwitterBaseImpl.getOAuthAccessToken(TwitterBaseImpl.java:364) [twitter4j-core-3.0.3.jar:3.0.3]
at org.picketlink.social.auth.TwitterAuthenticator.authenticate(TwitterAuthenticator.java:73) [picketlink-social-2.5.2.Final.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:45) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
at org.jboss.weld.proxies.Authenticator$1900509371$Proxy$$$_WeldClientProxy.authenticate(Authenticator$1900509371$Proxy$$$_WeldClientProxy.java) [weld-core-1.1.13.Final-redhat-1.jar:]
at org.picketlink.internal.DefaultIdentity.authenticate(DefaultIdentity.java:173) [picketlink-impl-2.5.0.Final.jar:]
... 16 more
=====================