Analysis of Shiro security framework
Shiro function introduction
The following describes the meaning of each function point:
Authentication: authentication / login, to verify whether the user has the corresponding identity;
Authorization: authorization, that is, permission verification, to verify whether an authenticated user has a cert ...
Posted by rednaxel on Tue, 14 Jan 2020 22:12:51 -0800
ShiroFilterFactoryBean, a key bean for the integration of shrio and spring
1. Let's first look at the inheritance relationship of ShiroFilterFactoryBean
public class ShiroFilterFactoryBean implements FactoryBean, BeanPostProcessor
The FactoryBean interface is implemented, which is an important interface in spring, so let's take a look at the interface methods implemented by t ...
Posted by chreez on Tue, 14 Jan 2020 02:04:44 -0800
Shiro authority management framework: custom Filter implementation and troubleshooting records
Clear demand
When using Shiro, the authentication failure is usually to return an error page or login page to the front-end, especially the back-end system. This mode is particularly used. But now more and more projects tend to use the way of front-end and back-end separation for development. At this time, the front-end needs to respond to the ...
Posted by HairyArse on Tue, 07 Jan 2020 07:15:13 -0800
Facade design pattern in Java and how to realize it with code
Facade design mode is also called appearance design mode. Its core idea is just like its literal meaning. It provides users with a portal. Users only need to access the portal to get the data they want, without managing the internal structure of the portal, and without knowing the running process. For developers, using facade mode, we can only ...
Posted by jrose83 on Mon, 23 Dec 2019 01:47:58 -0800
Shiro easy to use record
1. Custom token: defines a class inherited from: UsernamePasswordToken
public class MyToken extend UsernamePasswordToken
2. Login operation:
Subject currentUser = SecurityUtils.getSubject();
currentUser.login(MyToken);
3. Custom password certificate: define a class, inherited from: authorizing realm
public class UserRealm ...
Posted by NeoSsjin on Thu, 19 Dec 2019 13:16:34 -0800
Spring boot integrates shiro configuration
1. Configure lifecycle bean postprocessor to manage lifecycle
2. Configure ShiroFilterFactoryBean to set which paths require authentication and which do not
3. Enable shiro Aop annotation to support AuthorizationAttributeSourceAdvisor
4. Configure SecurityManager to manage custom realms, session s, and caches
Realm realizes logi ...
Posted by Wintergreen on Wed, 04 Dec 2019 20:33:14 -0800
Integrating spring cloud cloud service architecture - common service project construction process
We will analyze the whole project of common service, record the whole construction process, and let more people to learn.
First, before building the common service of spring cloud, we need to prepare the following technologies:
Maven (project construction), Spring Boot, Spring Cloud, microservice concept, decentralization idea, distribution, e ...
Posted by Bertholt on Mon, 25 Nov 2019 06:36:01 -0800
shiro learning (IV. shiro integrates spring+springmvc)
Dependency: Spring context, spring MVC, Shiro core, Shiro spring, Shiro Web
To be honest: web.xml,spring,springmvc configuration files are very difficult
General effect
Code structure (built with web skeleton)
pom.xml
<dependencies>
<dependency>
<groupId>junit</groupId>
<a ...
Posted by php1999 on Tue, 19 Nov 2019 10:12:33 -0800
shiro four encryption realm login and logout
shiro encryption operation
Hash algorithm is generally used to generate summary information of data. It is an irreversible algorithm, which is generally suitable for storing data such as passwords, and common hash legal persons such as MD5 and SHA. In general, it is better to provide a salt for hash algorithm, such as encrypte ...
Posted by isuckat_php on Sat, 16 Nov 2019 14:12:58 -0800
(VII) construction process of b2b2c social e-commerce spring cloud distributed microservice common service project of spring cloud
We will analyze the whole project of common service, record the whole construction process, and let more people to learn.
First, before building the common service of spring cloud, we need to prepare the following technologies:
Maven (project construction), Spring Boot, Spring Cloud, microservice concept, decentralization idea, distribution, ...
Posted by Schwalbach on Sun, 03 Nov 2019 12:19:23 -0800