Commit 3a27af98 by fengshuonan

开启第三方登录

parent 91722713
@/* 页脚 */ @/* 页脚 */
<div class="layui-footer"> <div class="layui-footer">
Copyright © 2018 <a href="https://www.stylefeng.cn" target="_blank">stylefeng</a> All rights reserved. Copyright © 2019 <a href="https://www.stylefeng.cn" target="_blank">stylefeng</a> All rights reserved.
<span class="pull-right">Version Vip 1.0</span> <span class="pull-right">Version 企业版 v2.0</span>
</div> </div>
@/* 手机屏幕遮罩层 */ @/* 手机屏幕遮罩层 */
......
...@@ -31,6 +31,13 @@ ...@@ -31,6 +31,13 @@
<version>1.0.0</version> <version>1.0.0</version>
</dependency> </dependency>
<!-- 第三方登录 -->
<dependency>
<groupId>cn.stylefeng</groupId>
<artifactId>guns-base-third-login</artifactId>
<version>1.0.0</version>
</dependency>
<!-- 分布式job --> <!-- 分布式job -->
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>cn.stylefeng</groupId>--> <!-- <groupId>cn.stylefeng</groupId>-->
...@@ -38,13 +45,6 @@ ...@@ -38,13 +45,6 @@
<!-- <version>1.0.0</version>--> <!-- <version>1.0.0</version>-->
<!-- </dependency>--> <!-- </dependency>-->
<!-- 第三方登录 -->
<!-- <dependency>-->
<!-- <groupId>cn.stylefeng</groupId>-->
<!-- <artifactId>guns-base-third-login</artifactId>-->
<!-- <version>1.0.0</version>-->
<!-- </dependency>-->
</dependencies> </dependencies>
<build> <build>
......
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
*/ */
package cn.stylefeng.guns.config; package cn.stylefeng.guns.config;
import cn.stylefeng.guns.oauth.core.shiro.matcher.WithOAuthTokenMatcher;
import cn.stylefeng.guns.sys.core.constant.Const; import cn.stylefeng.guns.sys.core.constant.Const;
import cn.stylefeng.guns.sys.core.properties.GunsProperties; import cn.stylefeng.guns.sys.core.properties.GunsProperties;
import cn.stylefeng.guns.sys.core.shiro.GunsUserFilter; import cn.stylefeng.guns.sys.core.shiro.GunsUserFilter;
import cn.stylefeng.guns.sys.core.shiro.ShiroDbRealm; import cn.stylefeng.guns.sys.core.shiro.ShiroDbRealm;
import cn.stylefeng.guns.sys.core.shiro.ShiroKit; import cn.stylefeng.guns.sys.core.shiro.ShiroKit;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.cache.CacheManager; import org.apache.shiro.cache.CacheManager;
import org.apache.shiro.cache.ehcache.EhCacheManager; import org.apache.shiro.cache.ehcache.EhCacheManager;
import org.apache.shiro.codec.Base64; import org.apache.shiro.codec.Base64;
...@@ -111,12 +111,12 @@ public class ShiroConfig { ...@@ -111,12 +111,12 @@ public class ShiroConfig {
*/ */
@Bean @Bean
public ShiroDbRealm shiroDbRealm() { public ShiroDbRealm shiroDbRealm() {
HashedCredentialsMatcher hashedCredentialsMatcher = new HashedCredentialsMatcher(); WithOAuthTokenMatcher withOAuthTokenMatcher = new WithOAuthTokenMatcher();
hashedCredentialsMatcher.setHashAlgorithmName(ShiroKit.hashAlgorithmName); withOAuthTokenMatcher.setHashAlgorithmName(ShiroKit.hashAlgorithmName);
hashedCredentialsMatcher.setHashIterations(ShiroKit.hashIterations); withOAuthTokenMatcher.setHashIterations(ShiroKit.hashIterations);
ShiroDbRealm shiroDbRealm = new ShiroDbRealm(); ShiroDbRealm shiroDbRealm = new ShiroDbRealm();
shiroDbRealm.setCredentialsMatcher(hashedCredentialsMatcher); shiroDbRealm.setCredentialsMatcher(withOAuthTokenMatcher);
return shiroDbRealm; return shiroDbRealm;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment