cost 103 ms
SecurityFilterChain 中的自定义身份验证处理过滤器位置? - Custom Authentication Processing Filter Location in SecurityFilterChain?

我有一个AbstractAuthenticationProcessingFilter的自定义实现,我需要将其手动插入到安全过滤器链中。 我看过多个教程,每个教程都说要在链中的不同过滤器之前或之后插入它。 关于应该放置此过滤器的位置是否有明确的答案? 或者,至少,一个可以帮助解决问题的经验法则? 视 ...

为什么我在使用 Spring Security 6、permitAll 和禁用 CSRF 后得到 401? - Why am I getting a 401 when using Spring Security 6, permitAll and after disabiling CSRF?

有一些类似的问题,所以我已尽力表示差异,但我已经审查过它们,但它们似乎与我的问题不符。 我有一些简单的用例...... 我尝试像这样使用 spring 安全性来让它工作...... 但是当我运行并尝试使用 GET 请求http://localhost:8080时,我仍然得到 401。如果我从 PO ...

在 Spring Cloud Gateway 中使用 Auth0,获取 ID Token 时出现问题 - Using Auth0 in Spring Cloud Gateway, problem with getting ID Token

我们在使用 auth0 SDK 获取 ID 令牌时遇到问题。我们有基于 Spring 云网关(版本 3.1.4)的 API 网关,我们尝试使用您的 auth0 平台对用户进行身份验证,然后将交换路由到我们的微服务。 为此,我们想使用 ID Token 并从中获取 email 并将此 email 传递 ...

单元测试返回 401 Unauthorized on a permitted route in Spring WebFlux Security - Unit test returns 401 Unauthorized on a permitted route in Spring WebFlux Security

我正在尝试测试返回对象数组的路由,但测试失败,因为它返回 Unauthorized 而不是 200 OK 我的测试 class 而ApplicationSecurityConfig class,有一个SecurityWebFilterChain Bean JUint 测试错误显示如下 java. ...

如何使用多个登录页面,一个用于管理员,另一个用于用户 - How to use multiple login pages one for admin and the other one for user

我想要两个不同的登录页面。 一个供管理员使用,另一个供用户使用。 当我从 static 类中删除@Order注释时,仅使用带有@Order(1)的 class 下面的代码,只有最后一个有效。 我在两个不同的ConfigSecurity文件中使用了它们,但没有用。 我期待他们两个都能工作。 然而只有一 ...

Spring 授权服务器为每个客户端进行身份验证 - Spring authorization server authenticate for each client

我正在尝试使用第三方应用程序将用于 FIM(联合身份管理)的 Spring 授权服务器构建身份提供者。 我们希望每个 OAuth 客户端都需要身份验证(如果用户尝试使用不同的客户端登录,则他们需要为每个客户端进行身份验证)。 开箱即用的流程如下所示: 所以有2个问题。 /oauth2/autho ...

Spring 引导:注销后,带有过期 Cookie 的请求仍然可用 - Spring boot: Requests with an expired Cookie is still available after logging out

在 spring 引导项目中,当用户注销时,我们使用以下代码块使 cookie 失效: 然而,在注销后,我用一个应用程序测试了我的网站,以捕获请求并通过中继器重新发送它,并使用准确的值,例如令牌和有效负载。 例如,我拒绝了更改 email 地址的请求,尽管已注销,但此请求在 15 分钟内有效(对于原 ...

Spring 安全 - 使用 WebClient 访问通过 Oauth2“密码”授权类型保护的资源 - Spring security - using WebClient access a resource that is protected via Oauth2 "Password" grant type

赏金将在 6 天后到期。 此问题的答案有资格获得+50声望赏金。 tm1701想提请更多人注意这个问题。 如何使用 WebClient 访问受 Oauth2“密码”授权类型保护的资源? 连接 Oauth2 'client-credentials' 有效。 在这种情况下,我需要密码授予类型。 我收 ...

Spring Boot 3 with Spring Security Intercepts exceptions 我不希望它 - Spring Boot 3 with Spring Security Intercepts exceptions I don't want it to

我正在使用 Spring Boot 3.0.2 和 Spring Security 构建一个 API,我已经构建了安全过滤器链,它在阻止未经身份验证的请求方面运行良好。 但是我有一个接受application/json的RestController class,如果我没有正确提供内容类型 heade ...

我可以让 Spring Boot 创建一个使用 OAuth2 的 WebClient 而不尝试将 OAuth 流应用到我的端点吗? - Can I have Spring Boot create a WebClient which uses OAuth2 without it trying to apply the OAuth flow to my endpoints?

我想要一个使用 client_credentials OAuth2 流来授权 API 的 WebClient。我遵循了从文档到几个教程的各种说明。 我觉得我非常接近让 Spring Boot 做我想做的事,但默认行为是做我不想做的事——当我向我的任何控制器发出请求时,我被重定向到 /login。 ...

使用解析 JSON 有效负载的自定义身份验证过滤器在身份验证后禁止获取 403 - Getting 403 forbidden after authentication using custom authentication filter that parses JSON payload

我想要做的只是使用自定义身份验证过滤器对内存中的默认用户进行身份验证,该过滤器解析包含用户名和密码的 JSON 有效负载。 安全配置.javapackage ali.yousef.authdemo.config.security; @Configuration @EnableWebSecurit ...

使用用户名和密码进行身份验证后,如何在对 API 的所有后续调用中使用 BearerToken - How do I use the BearerToken in all subsequent calls to the API after authenticating using username & password

我有一个 CustomAuthenticationProvider,它使用用户名和密码向 API 发出 POST 请求以进行身份验证,API 返回一个带有到期时间的访问令牌。 我在哪里设置这个令牌,所以只要用户登录,我就可以使用相同的令牌进一步调用 API。我还想在发出另一个请求之前验证令牌的到期 ...

API 在所有请求上都需要 JWT 令牌,尽管进行了身份验证配置 - API requires JWT Token on all requests despite the authentication configuration

我正在尝试按照本教程(本教程的后续教程)为我的 API 实施 JWT 授权。当我尝试使用“/authenticate”和“/register”时,出现错误“JWT Token does not从 Bearer String 开始”。 这是抛出错误的请求过滤器的一部分: 这是应该允许“验证”和“请求” ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM