ICode9

精准搜索请尝试: 精确搜索
  • SpringSecurity+Token实现权限校验2022-08-16 20:04:15

    1.Spring Security简介 Spring Security是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架。它提供了一组可以在Spring应用上下文中配置的Bean,充分利用了Spring IoC,DI(控制反转Inversion of Control ,DI:Dependency Injection 依赖注入)和AOP(面向切

  • Spring Security 应用实践2022-01-19 22:32:03

    概述 Spring Security 是 Spring 在安全方面的推出的框架,是采用责任链的设计模式,基于 Spring AOP 和 Servlet 过滤器进行实现。这篇文章记录认证授权的一些概念,以及如何使用其进行扩展保护我们的应用。 认证与授权的概念 认证:我是谁授权:有哪些访问权限 在系统安全方面,我们面

  • 第十三章:(2)Spring Boot 与 安全 之 SpringBoot + SpringSecurity + Thymeleaf2022-01-06 20:31:09

    一、使用 Spring Security   1、引入依赖 <!--security 模块--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency>     2、编写 Spring Security 配置类

  • Spring Security 基于权限或角色进行访问控制的四种方法2021-07-24 22:03:32

    @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private UserDetailsService userDetailsService; @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception {

  • spring-security安全框架-注意事项——12021-06-27 21:34:15

    Spring Security注意事项 权限优先级: 在SecurityConfig中configure(HttpSecurity http)方法中,如下代码 http.authorizeRequests() .antMatchers("/admin/**").hasRole("admin") .antMatchers("/**").permitAll()

  • WebSocket连接请求被Spring Security拦截, WebSocket无法连接2021-06-16 20:05:19

    使用Spring Security时,Security默认会拦截WebSocket连接。  最近项目中使用Spring Security进行验证过滤,后来发现Spring Security拦截http的同时也拦截了websocket,导致websocket无法连接,尝试各种方法,包括 configure(HttpSecurity httpSecurity) 中各种配置还是无效,后来经过尝试

  • SpringBoot_与安全2021-06-14 11:30:07

    一、创建测试工程  1、引入依赖:这时还没有引入spring-security <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <dependency> <groupId>org.springframew

  • SpringSecurity认证和权限2021-06-09 19:32:55

    导入SpringSecurity依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId></dependency>然后继承WebSecurityConfigurerAdapter重写configure方法 http.authorizeRequests()

  • SpringSecurity(二十三):authorizeRequests顺序2021-05-30 17:03:54

    我们在使用spring Security时,需要注意authorizeRequests的顺序 @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .anyRequest().authenticated() .antMatchers("/hello").permitAll()

  • SpringBoot集成SpringSecurity(五)授权控制2021-03-31 16:59:52

    授权控制 授权包括web授权、方法注解授权。 web授权 SpringSecurity通过http.authorizeRequests()对web请求(URL访问)进行授权保护。 一、请求匹配 1、antMatchers("/login","/getver"):匹配到的请求。此时实际上访问这些路径的用户为匿名用户anonymousUser,其权限列表为[ROLE_ANONY

  • 6.登出操作的配置2021-03-13 03:33:34

    1.配置内容 protected void configure(HttpSecurity http) throws Exception { http.logout().logoutUrl("/logout").logoutSuccessUrl("/hello").permitAll(); http.formLogin() //表单登录 .loginPage("/login.html") //登录页面

  • 5.资源访问的权限控制2021-03-13 02:32:46

    我们在学习shiro的时候,知道有两个注解 @RequiresPermissions("user:ccc") @RequiresRoles("admin") spring security也提供了类似的功能,它从两个方面来提供的 1配置 2注解 1.配置形式的提供 我们这边有两个需要访问的资源 @RestController public class AuthController { @

  • springsecurity的登陆用户信息查询接口的校验或hasIpAddress()用法2021-02-01 15:30:28

    springsecurity的登陆用户信息查询接口的校验或hasIpAddress()用法 一般的微服务架构下,auth服务都是单独的只做token颁发和校验的模块,所以当在进行用户登录或其他操作的时候,都需要调用其他的服务进行用户信息的查询和密码比对。 那么其他服务的这个接口的隐蔽性就会受到挑战

  • SpringSecurity的简单使用(1)2021-01-31 04:32:39

    SpringSecurity是基于Spring应用提供的声明式的安全保护性的框架,它可以在web请求级别的和方法调用级别处理身份和授权。 1.引入SpringSecurity 创建maven项目引入依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-securi

  • 学习springseacurity2020-12-25 14:04:36

    springsecurity,一个很秀的框架,今天开始一步一步的去接触它,第一步添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 添加上依赖,我去访问项目,直接就这样了 开始慢慢的去搞

  • 【SpringSecurity】01 授权、认证、注销2020-07-29 12:31:25

    【前提情要】 Security学习地址: https://www.bilibili.com/video/BV1KE411i7bC 狂神的微信笔记: https://mp.weixin.qq.com/s?__biz=Mzg2NTAzMTExNg==&mid=2247483957&idx=1&sn=fc30511490b160cd1519e7a7ee3d4ed0&chksm=ce610496f9168d8082bf6cb2e54b0b8628a1db596c1d297d0

  • Spring Boot+Spring Security:页面白名单和获取登录信息2020-03-16 17:43:37

    说明 (1)JDK版本:1.8 (2)Spring Boot 2.0.6 (3)Spring Security 5.0.9 (4)Spring Data JPA 2.0.11.RELEASE (5)hibernate5.2.17.Final (6)MySQLDriver 5.1.47 (7)MySQL 8.0.12   需求缘起        在有些场景下我们要对一些url要设置白名单,比如注册页面,忘记密码,官网页面,那么怎么操作呐?

  • SpringSecurity---细粒度的权限控制2020-01-28 14:43:21

    第五章 细粒度权限控制 5.1 前置细节【Role和Authority的区别】 5.1.1 用户拥有的权限表示 roles("ADMIN","学徒","宗师") authorities("USER","MANAGER"); 5.1.2 给资源授予权限(角色或权限) //.antMatchers("/level1/**").hasRole("学徒") //.antMa

  • springSecurity5 重定向登录页面后 报错:尝试清除 Cookie.net::ERR_TOO_MANY_REDIRECTS status:2002019-12-07 23:54:46

    springSecurity5 使用: http.formLogin().loginPage("/login");报错如下图:   springsucurity5 中 需要给 自己定义的请求加权限: 失败代码如下: public class MySecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity

  • WebSecurityConfig2019-07-19 23:54:25

    package me.zhengjie.core.config;import me.zhengjie.core.security.JwtAuthenticationEntryPoint;import me.zhengjie.core.security.JwtAuthorizationTokenFilter;import me.zhengjie.core.service.JwtUserDetailsService;import org.springframework.beans.factory.annota

  • NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load xxxx错2019-07-18 16:01:12

    在开发项目的过程中,和后端对接,我们使用是一个成熟的集成很全面的架构JHipster。后端为java spring-boot 前端ts+react,需求是有一个需要在页面里嵌套iframe的需求。然后在iframe中发起$.ajax请求前端出现了错误如下: "NetworkError: Failed to execute 'send' on 'XMLHttpRequest':

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有