Commit 3a27af98 by fengshuonan

开启第三方登录

parent 91722713
@/* 页脚 */
<div class="layui-footer">
Copyright © 2018 <a href="https://www.stylefeng.cn" target="_blank">stylefeng</a> All rights reserved.
<span class="pull-right">Version Vip 1.0</span>
Copyright © 2019 <a href="https://www.stylefeng.cn" target="_blank">stylefeng</a> All rights reserved.
<span class="pull-right">Version 企业版 v2.0</span>
</div>
@/* 手机屏幕遮罩层 */
......
......@@ -31,6 +31,13 @@
<version>1.0.0</version>
</dependency>
<!-- 第三方登录 -->
<dependency>
<groupId>cn.stylefeng</groupId>
<artifactId>guns-base-third-login</artifactId>
<version>1.0.0</version>
</dependency>
<!-- 分布式job -->
<!-- <dependency>-->
<!-- <groupId>cn.stylefeng</groupId>-->
......@@ -38,13 +45,6 @@
<!-- <version>1.0.0</version>-->
<!-- </dependency>-->
<!-- 第三方登录 -->
<!-- <dependency>-->
<!-- <groupId>cn.stylefeng</groupId>-->
<!-- <artifactId>guns-base-third-login</artifactId>-->
<!-- <version>1.0.0</version>-->
<!-- </dependency>-->
</dependencies>
<build>
......
......@@ -15,12 +15,12 @@
*/
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.properties.GunsProperties;
import cn.stylefeng.guns.sys.core.shiro.GunsUserFilter;
import cn.stylefeng.guns.sys.core.shiro.ShiroDbRealm;
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.ehcache.EhCacheManager;
import org.apache.shiro.codec.Base64;
......@@ -111,12 +111,12 @@ public class ShiroConfig {
*/
@Bean
public ShiroDbRealm shiroDbRealm() {
HashedCredentialsMatcher hashedCredentialsMatcher = new HashedCredentialsMatcher();
hashedCredentialsMatcher.setHashAlgorithmName(ShiroKit.hashAlgorithmName);
hashedCredentialsMatcher.setHashIterations(ShiroKit.hashIterations);
WithOAuthTokenMatcher withOAuthTokenMatcher = new WithOAuthTokenMatcher();
withOAuthTokenMatcher.setHashAlgorithmName(ShiroKit.hashAlgorithmName);
withOAuthTokenMatcher.setHashIterations(ShiroKit.hashIterations);
ShiroDbRealm shiroDbRealm = new ShiroDbRealm();
shiroDbRealm.setCredentialsMatcher(hashedCredentialsMatcher);
shiroDbRealm.setCredentialsMatcher(withOAuthTokenMatcher);
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