【问题标题】:Which plugin / module of Spring Sec OAuth should be used in Grails 3.x?在 Grails 3.x 中应该使用 Spring Sec OAuth 的哪个插件/模块?
【发布时间】:2016-11-05 14:54:53
【问题描述】:

我正在尝试将我的 Grails 2.5 项目迁移到 Grails 3.1.4。在我的旧 BuildConfig 中,我使用了以下内容:

plugins {
  compile ':spring-security-core:2.0-RC5'
  compile ':spring-security-oauth:2.1.0-RC4'
  compile ':spring-security-oauth-facebook:0.2'
  compile ':spring-security-oauth-google:0.3.1'
}

现在我的 build.gradle 看起来像:

dependencies {
  compile 'org.grails.plugins:spring-security-core:3.1.1'
  //compile 'org.grails.plugins:spring-security-oauth:2.1.0-RC4'
  //compile 'org.grails.plugins:spring-security-oauth-facebook:0.2'
  //compile 'org.grails.plugins:spring-security-oauth-google:0.3.1'
}

构建成功,直到我取消注释注释行。这会导致如下错误:

Could not resolve all dependencies for configuration ':runtime'.
 Could not find spring-security-core.zip (org.grails.plugins:spring-security-core:3.1.1).
   Searched in the following locations:
     https://repo.grails.org/grails/core/org/grails/plugins/spring-security-core/3.1.1/spring-security-core-3.1.1.zip

那么,在 Grails 3 中安装和使用 OAuth (2?) 插件的正确方法是什么?

【问题讨论】:

  • 这方面有进展吗?
  • 在下面查看我的答案

标签: grails spring-security spring-security-oauth2


【解决方案1】:

抱歉,我忘记回复了,但@injecteer 我目前正在使用 Grails 3.2.2 测试以下插件,并且到目前为止它的工作。所以我认为接受的答案不再有效。

compile "org.grails.plugins:spring-security-oauth2:1.1.0"
compile "org.grails.plugins:spring-security-oauth2-facebook:1.0.0"
compile "org.grails.plugins:spring-security-oauth2-google:1.1.0"

【讨论】:

    【解决方案2】:

    目前没有可用于 Grails 3.x 的 Spring Security OAuth 插件。唯一的选择是使用基于 JS 的客户端解决方案。与Android / iOS 身份验证的工作方式相同,无需任何服务器端插件。

    【讨论】:

    • 对不起,插件只工作包名称不同。请在下面找到我的答案。
    • 你想要身份验证和授权插件@injecteer 吗?在圣杯中
    猜你喜欢
    • 2012-02-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-17
    • 1970-01-01
    • 2011-05-14
    • 1970-01-01
    相关资源
    最近更新 更多