• oO蜗牛君🐌、、
    2019-01-10
    1:问题 http://localhost:8083/resources/oauth-ng.js net::ERR_ABORTED 404 解决了。
    方案:
    第一步:在resource文件下建立一个任意文件夹,这里叫“js”,然后把“oauth-ng.js”文件copy进来;
    第二步:类UiWebConfig
    // registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
            registry.addResourceHandler("/js/**").addResourceLocations("classpath:/js/");
    总结:
    貌似 https://www.baeldung.com/ 上的这个代码没有符合spring目录规范,也不清楚为什么视频上的好用,具体不研究了,按照以上修改,肯定好用。
    展开
    
     2
  • swortect
    2019-01-28
    老师,想请教一下。前端因为代码可见,如何防止代码被别人下载,伪造ua和referer模拟真实请求获去token。

    作者回复: 简化模式安全性较低,通过指定redirect_uri+state参数+https,可以适当提高安全性。一般交易型应用不建议简化模式,如果需要更严格安全,请考虑授权码模式。

    
     1
  • 小猴子
    2018-12-28
    项目跑不起来oauth-ui-implicit 这一个报找不到oauth-ng.js

    作者回复: 应该是一些angularjs资源被墙了,我更了一些链接,你更新下代码再试。

    
     1
  • 尹兆发
    2019-01-16
    oauth_server启动的时候报错:请老师指点一下。


    报错如下:
    Wed Jan 16 21:05:19 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.


    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'revokeTokenEndpoint': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenServices' defined in class path resource [io/spring2go/config/OAuth2AuthorizationServerConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.DefaultTokenServices]: Factory method 'tokenServices' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenStore' defined in class path resource [io/spring2go/config/OAuth2AuthorizationServerConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.TokenStore]: Factory method 'tokenStore' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [io/spring2go/config/OAuth2AuthorizationServerConfig.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException:
    展开

    作者回复: 你好,可以尝试下在persistence.properties中的连接字符串jdbc.url后面加useSSL=true,参考:https://blog.csdn.net/guoweimelon/article/details/50810399

    
    
  • oO蜗牛君🐌、、
    2019-01-10
    oauth-ui-implicit 这个报错,找不到以下文件,上面同学也是这个问题,您说更新代码,但是我看代码还是旧的~
    我已经翻墙了~
    localhost/:31 GET http://localhost:8083/resources/oauth-ng.js net::ERR_ABORTED 404
    
    
  • oO蜗牛君🐌、、
    2019-01-10
    bobo老师,我看授权页面太丑了,能修改么?或者是二次开发,请指点一下。谢谢。

    作者回复: 定制授权页可以参考这里:https://stackoverflow.com/questions/29345508/spring-oauth2-custom-oauth-approval-page-at-oauth-authorize。如果还需要对spring security oauth2做深度定制,可以参考这个项目:https://github.com/newnil/oauth2-family-barrel

    
    
  • swortect
    2018-12-31
    隐含模式就是简化模式么

    作者回复: 嗯,implicit官方翻为简化模式,英文原义是不言明的,隐含的,所以我也常翻成隐合模式。

    
    
我们在线,来聊聊吧