gpt4 book ai didi

java - Twitter OAuth getRequestToken 失败

转载 作者:行者123 更新时间:2023-11-30 11:35:40 25 4
gpt4 key购买 nike

今天,我的 Twitter OAuth 框架开始出现故障,请问以下是什么意思?当我尝试使用“http://twitter.com/oauth/request_token”获取请求 token 时会发生这种情况……有什么想法吗?

堆栈:

 2013-02-20 14:24:47,954 [ajp-8009-67] WARN  org.apache.commons.httpclient.HttpMethodBase - Cookie rejected: "$Version=0; k=206.220.219.228.a1d883477ac32b42; $Path=/; $Domain=.com". Domain attribute ".com" violates RFC 2109: domain must contain an embedded dot
2013-02-20 14:24:47,954 [ajp-8009-67] ERROR com.web.helper.TwitterDelegate - Fire Eagle authentication failure. Please try again later or contact customer service.
net.oauth.OAuthProblemException: HTTP/1.1 301 Moved Permanently
at net.oauth.client.OAuthResponseMessage.toOAuthProblemException(OAuthResponseMessage.java:83)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:306)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:260)
at net.oauth.client.OAuthClient.getAccessToken(OAuthClient.java:229)
at com.api.service.impl.GenericOAuthServiceImpl.getAccessToken(GenericOAuthServiceImpl.java:117)
at com.api.service.impl.SocialNetworkingServiceImpl.getAuthTokens(SocialNetworkingServiceImpl.java:81)
at sun.reflect.GeneratedMethodAccessor12755.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
at $Proxy150.getAuthTokens(Unknown Source)
at com.web.helper.OAuthDelegate.retrieveAuthTokens(OAuthDelegate.java:82)
at com.web.action.SocialNetwork.setCallbackForm(SocialNetwork.java:215)
at sun.reflect.GeneratedMethodAccessor1981.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at javax.el.BeanELResolver.setValue(BeanELResolver.java:108)
at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:69)
at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:100)
at org.apache.el.parser.AstValue.setValue(AstValue.java:143)
at org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
at javax.faces.component.UIComponent.processEvent(UIComponent.java:2182)
at javax.faces.component.UIViewRoot$1.visit(UIViewRoot.java:873)
at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:147)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1443)
at javax.faces.component.UIForm.visitTree(UIForm.java:333)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1454)
at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:868)
at org.ajax4jsf.component.AjaxViewRoot.processRestoreState(AjaxViewRoot.java:761)
at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:197)
at javax.faces.application.StateManagerWrapper.restoreView(StateManagerWrapper.java:178)
at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)
at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:312)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:174)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:427)
at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:384)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1556)
at java.lang.Thread.run(Thread.java:636)
2013-02-20 14:24:47,976 [ajp-8009-67] INFO com.api.service.impl.GenericOAuthServiceImpl - GETTING REQ TOKEN, CALLBACK URLhttps://login.findmecom.com/com-main-web/mobile/landing.html
2013-02-20 14:24:48,014 [ajp-8009-67] WARN org.apache.commons.httpclient.HttpMethodBase - Cookie rejected: "$Version=0; k=206.220.219.228.75dbd59bf0bb469e; $Path=/; $Domain=.com". Domain attribute ".com" violates RFC 2109: domain must contain an embedded dot

Twitter 在异常中返回以下内容:

"HTTP request => GET /oauth/request_token?oauth_callback=http%3A%2F%2Flocalhost%3A8080%2Fmy-main-web%2Fmobile%2Flanding.html&oauth_consumer_key=UuuAUY41K974e3DDTvdN2Q&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1361376590&oauth_nonce=414154092249267&oauth_version=1.0&oauth_signature=DEQzMRl40KPqo9%2FVD5XG3R5v7EI%3D
User-Agent: Jakarta Commons-HttpClient/3.1
Host: twitter.com

"
"HTTP status => 301"

"Location => https://twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2Flocalhost%3A8080%2Fmy-main-web%2Fmobile%2Flanding.html&oauth_consumer_key=UuuAUY41K974e3DDTvdN2Q&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1361376590&oauth_nonce=414154092249267&oauth_version=1.0&oauth_signature=DEQzMRl40KPqo9%2FVD5XG3R5v7EI%3D"


"HTTP response => HTTP/1.1 301 Moved Permanently
Location: https://twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2Flocalhost%3A8080%2Fmy-main-web%2Fmobile%2Flanding.html&oauth_consumer_key=UuuAUY41K974e3DDTvdN2Q&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1361376590&oauth_nonce=414154092249267&oauth_version=1.0&oauth_signature=DEQzMRl40KPqo9%2FVD5XG3R5v7EI%3D
Content-Length: 0
Set-Cookie: k=206.220.220.206.dbf3e9c4278a09e7; path=/; expires=Wed, 27-Feb-2013 16:09:52 UTC; domain=.com; httponly
Date: Wed, 20 Feb 2013 16:09:52 UTC
Server: tfe

"

"URL => http://twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2Flocalhost%3A8080%2Fmy-main-web%2Fmobile%2Flanding.html&oauth_consumer_key=UuuAUY41K974e3DDTvdN2Q&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1361376590&oauth_nonce=414154092249267&oauth_version=1.0&oauth_signature=DEQzMRl40KPqo9%2FVD5XG3R5v7EI%3D"

最佳答案

关于java - Twitter OAuth getRequestToken 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14985647/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com