クラス UrlAuthorizationConfigurer<H extends HttpSecurityBuilder<H>>

型パラメーター:
H - 構成されている HttpSecurityBuilder の型
実装されたすべてのインターフェース:
SecurityConfigurer<DefaultSecurityFilterChain,H>

@DeprecatedSE public final class UrlAuthorizationConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractInterceptUrlConfigurer<UrlAuthorizationConfigurer<H>,H>
使用すべきではありません。
代わりに AuthorizeHttpRequestsConfigurer を使用してください
DefaultFilterInvocationSecurityMetadataSource を使用して URL ベースの認証を追加します。この SecurityContextConfigurer に意味を持たせるには、少なくとも 1 つの RequestMapping を ConfigAttribute にマップする必要があります。

セキュリティフィルター

使用箇所には、UrlAuthorizationConfigurer の適用と StandardInterceptUrlRegistry の変更が含まれます。例:

 @Bean
 public SecurityFilterChain filterChain(HttpSecurity http, ApplicationContext context) throws Exception {
        http.apply(new UrlAuthorizationConfigurer<HttpSecurity>(context)).getRegistry()
                        .requestMatchers("/users**", "/sessions/**").hasRole("USER")
                        .requestMatchers("/signup").hasRole("ANONYMOUS").anyRequest().hasRole("USER");
 }
 
次のフィルターが読み込まれます

作成された共有オブジェクト

次の共有オブジェクトは、他の SecurityConfigurer がカスタマイズできるように設定されています。

使用される共有オブジェクト

次の共有オブジェクトが使用されます。
  • AuthenticationManager
導入:
3.2
関連事項: