Spring Security Facebook身份验证不起作用

时间:2012-11-16 12:52:48

标签: grails spring-security

我刚从here安装了这个插件。

安装并配置完整个应用程序后停止工作。

当我点击我的应用的任何链接时,我收到此错误:

java.lang.NullPointerException: Cannot get property 'accessToken' on null object
    com.the6hours.grails.springsecurity.facebook.DefaultFacebookAuthDao.create(DefaultFacebookAuthDao.groovy:110)
    com.the6hours.grails.springsecurity.facebook.FacebookAuthProvider.authenticate(FacebookAuthProvider.groovy:39)
    com.the6hours.grails.springsecurity.facebook.FacebookAuthCookieTransparentFilter.doFilter(FacebookAuthCookieTransparentFilter.groovy:47)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    java.lang.Thread.run(Thread.java:722)

为什么会发生此异常?

编辑:

我得到的例外是:

2012-11-16 18:58:28,662 [http-bio-8080-exec-1] ERROR facebook.FacebookAuthUtils  - Can't read data from Facebook
Message: Server returned HTTP response code: 400 for URL: https://graph.facebook.com/oauth/access_token?
    Line | Method
->>   96 | requestAccessToken in com.the6hours.grails.springsecurity.facebook.FacebookAuthUtils
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|     90 | getAccessToken     in     ''
|     35 | authenticate . . . in com.the6hours.grails.springsecurity.facebook.FacebookAuthProvider
|     47 | doFilter           in com.the6hours.grails.springsecurity.facebook.FacebookAuthCookieTransparentFilter
|   1110 | runWorker . . . .  in java.util.concurrent.ThreadPoolExecutor
|    603 | run                in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . . . . .  in java.lang.Thread

[http-bio-8080-exec-1] ERROR facebook.FacebookAuthProvider  - Creating user w/o access_token
[http-bio-8080-exec-1] ERROR [/presto].[gsp]  - Servlet.service() for servlet [gsp] in context with path [/presto] threw exception
Message: Cannot get property 'accessToken' on null object

提前致谢。

0 个答案:

没有答案