cost 86 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 安全 -> SecurityConfig 導致 ERR_TOO_MANY_REDIRECTS

[英]Spring Security -> SecurityConfig causes ERR_TOO_MANY_REDIRECTS

嘗試訪問我的 Spring SecurityConfig 中的登錄頁面時,是什么導致“ERROR_TOO_MANY_REDIRECTS” ? 我不確定問題是否出在SecurityConfig中,但這就是我的假設。 我將 Spring Boot 3.0.2 與 IntelliJ IDE Commun ...

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。 ...

注銷處理程序掛起

[英]Logout handler is hanging

我正在將工作應用程序從 Spring Boot 2.6.5 升級到 2.7.8 (Spring Security 5.7.6),以便我可以更好地升級到 3.0。 注銷之前工作正常。 但是在升級到 Sprint Boot 2.7.8 之后,注銷處理掛起並且永遠不會重定向到logoutSuccessUr ...

使用解析 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