realm

Carthage Build Failed

半世苍凉 提交于 2020-08-21 06:44:44
问题 I ran carthage bootstrap --platform iOS and got "Skipped installing realm-cocoa.framework binary due to the error: Incompatible Swift version - framework was built with 3.1 and the local version is 4.0", and then at the end of the build I got a full on "Build Failed: Task failed with exit code 65" error. It points me to the derivedDataPath , and I checked the xcodebuild log for more details where it let me know "PhaseScriptExecution Download\ Core\ and\ Sync /Users/user/Libary/Caches/org

Carthage Build Failed

|▌冷眼眸甩不掉的悲伤 提交于 2020-08-21 06:43:21
问题 I ran carthage bootstrap --platform iOS and got "Skipped installing realm-cocoa.framework binary due to the error: Incompatible Swift version - framework was built with 3.1 and the local version is 4.0", and then at the end of the build I got a full on "Build Failed: Task failed with exit code 65" error. It points me to the derivedDataPath , and I checked the xcodebuild log for more details where it let me know "PhaseScriptExecution Download\ Core\ and\ Sync /Users/user/Libary/Caches/org

Java 程序员如何使用 Shiro 框架

不羁的心 提交于 2020-08-18 07:14:50
微信搜索【 Java秃头哥 】,关注我,每天8点半推送技术优质文章。回复关键词“222”,领取100本架构师相关书籍。 作者:冷豪 来自:www.cnblogs.com/learnhow/p/5694876.html 一、架构 要学习如何使用Shiro必须先从它的架构谈起,作为一款安全框架Shiro的设计相当精妙。Shiro的应用不依赖任何容器,它也可以在JavaSE下使用。但是最常用的环境还是JavaEE。下面以用户登录为例: 1、使用用户的登录信息创建令牌 UsernamePasswordToken token = new UsernamePasswordToken(username, password); token可以理解为用户令牌,登录的过程被抽象为Shiro验证令牌是否具有合法身份以及相关权限。 2、执行登陆动作 SecurityUtils.setSecurityManager(securityManager); // 注入SecurityManager Subject subject = SecurityUtils.getSubject(); // 获取Subject单例对象 subject.login(token); // 登陆 Shiro的核心部分是SecurityManager,它负责安全认证与授权。Shiro本身已经实现了所有的细节

After adding Kapt plugin - A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

馋奶兔 提交于 2020-08-17 12:11:31
问题 First of all, I'm pretty much aware that a lot of questions on this error had been posted already here, and none of them seems to be having a proper solution especially the one I need. I'm stuck with the following error for over a week. I'm working on an android project which is being built using Kotlin, MVVM, Clean Arch, and Navigation Components. I recently added realm database, and for that I had to add the following plugins. apply plugin: 'kotlin-kapt' apply plugin: 'realm-android' The

spring-boot学习:十九、spring-boot集成activemq

故事扮演 提交于 2020-08-16 14:00:53
一、安装activemq(windows) 下载后解压到指定目录 http://activemq.apache.org/components/classic/download/ 配置文件D:\software\apache-activemq-5.15.9\conf 1)jetty.xml 配置控制台地址和端口: <bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start"> <!-- the default port number for the web console --> <property name="host" value="0.0.0.0"/> <property name="port" value="8161"/> </bean> 角色: <bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint"> <property name="name" value="BASIC" /> <property name="roles" value="user,admin" /> <!-- set authenticate=false to disable login -

Shiro Realm 权限的验证流程和缓存机制

无人久伴 提交于 2020-08-16 01:30:04
我们可以定义多个Realm权限类,继承AuthenticatingRealm。 如果是这样,那Shiro验证的策略和顺序是怎样的呢? 策略 通过查看源码,Shiro的Spring Boot自动配置是至少一个通过策略,即有一个权限类通过就判定有权限并通过。 自动配置类: org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration @Bean @ConditionalOnMissingBean @Override protected AuthenticationStrategy authenticationStrategy() { return super.authenticationStrategy(); } protected AuthenticationStrategy authenticationStrategy() { return new AtLeastOneSuccessfulStrategy(); } 其他还有全部通过、首个通过,更多可以查看Shiro包下面的权限策略。 org.apache.shiro.authc.pam 顺序 Shiro是按在Spring Boot配置类中定义Realm Bean的顺序进行验证权限的。 验证流程 假设现在有R1,R2权限类

shiro整合shiro多验证登录(账号密码登录和使用手机验证码登录)

爱⌒轻易说出口 提交于 2020-08-15 07:56:19
1. 首先新建一个shiroConfig shiro的配置类,代码如下: @Configuration是标识这个类是一个配置文件,在启动时会加载这个类里面的内容,这个配置文件的位置的一定一定一定不能防止启动类外面的文件夹中,否则还会在启动类上加注解 @Bean 是将这个类交给spring管理 @Configuration public class SpringShiroConfig { /** * @param realms 这儿使用接口集合是为了实现多验证登录时使用的 * @return */ @Bean public SecurityManager securityManager(Collection<Realm> realms) { DefaultWebSecurityManager sManager = new DefaultWebSecurityManager(); sManager.setRealms(realms); return sManager; } @Bean public ShiroFilterFactoryBean shiroFilterFactory(SecurityManager securityManager) { ShiroFilterFactoryBean sfBean = new ShiroFilterFactoryBean(); sfBean

shiro验证流程

和自甴很熟 提交于 2020-08-14 12:47:45
shiro验证流程 @Author:zxw @school:吉首大学 1. 前言 最近开发项目的时候,连续两个项目使用的都是shiro权限验证框架,虽然以前使用过该框架并且也做过项目不过并没有了解底层的执行原理,懵懵懂懂的了解在接手现在这个项目的时候,使用的方式与之间大为不同,所以决定先花点时间了解shiro的执行流程以便更方便弄懂项目。 2. 业务流程 首先看看登录代码 // 一个简单的认证对象 UsernamePasswordToken token = new UsernamePasswordToken ( username , password , rememberMe ); Subject subject = SecurityUtils . getSubject (); subject . login ( token ); 看看login()方法里面具体做了什么,有Subject的实现类 DelegatingSubject 实现 public void login ( AuthenticationToken token ) throws AuthenticationException { clearRunAsIdentitiesInternal (); // 构造一个已认证的subject实例 Subject subject = securityManager .

shiro 后台逻辑处理登陆

我只是一个虾纸丫 提交于 2020-08-13 18:12:21
AuthenticationToken token = new UsernamePasswordToken(username, password.toCharArray(), false, null, null, false); Subject subject = UserUtils.getSubject(); subject.login(token); 当调用ShiroHandler中的subject.login()的时候,会自动调用Realm中的doGetAuthenticationInfo方法。 来源: oschina 链接: https://my.oschina.net/qiaojj/blog/4471346

Docker搭建私有仓库

醉酒当歌 提交于 2020-08-13 09:53:48
1.启动registry docker run -d -p 5000:5000 --restart=always --name registry -v /opt/registry:/var/lib/registry registry 2.修改配置文件 vim /etc/docker/daemon.json { "registry-mirrors": [ "https://registry.docker-cn.com"], "insecure-registries":["192.168.91.12:5000"] } 3.上传镜像到私有仓库中 docker tag nginx:latest 192.168.91.12:5000/oldguo/nginx:v1 docker push 192.168.91.12:5000/oldguo/nginx:v1 4.验证:登录另一台docker机器,从仓库里下载镜像 docker pull 192.168.91.12:5000/oldguo/nginx:v1 仓库设定密码验证 1.安装httpd工具 yum install httpd-tools -y mkdir /opt/registry-auth/ -p htpasswd -Bbn oldguo 123 >/opt/registry-auth/htpasswd 2