2017-10-09 12 views
0

私はすべてのリダイレクトを安全にする(https)必要がある春のセキュリティアプリケーションを用意しています。しかし、それは私にブラウザ上で "ERR_TOO_MANY_REDIRECTS"を与えています。誰でも助けてもらえますか?あなたのコードで春のセキュリティアプリケーションのERR_TOO_MANY_REDIRECTS

http 
     .authorizeRequests() 
     .anyRequest().hasRole("QA") 
     .and() 
     .addFilterBefore(oidcAuthenticationFilter(), AbstractPreAuthenticatedProcessingFilter.class) 
     .exceptionHandling() 
     .authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/openid_connect_login")).and().requiresChannel().anyRequest().requiresSecure(); 

答えて

0

あなたは.anyRequest().hasRole("QA")ライン.Thisラインを追加anyRequestが認証および役割「QA」を持っていなければならないことを意味します。少なくとも1ページまたはURLを許可する必要があります。

この

http 
      .authorizeRequests() 
      .antMatchers("/openid_connect_login/**").permitAll() 
      .anyRequest().authenticated() 
      .anyRequest().hasRole("QA") 
      .and() 
      .addFilterBefore(oidcAuthenticationFilter(), AbstractPreAuthenticatedProcessingFilter.class) 
      .exceptionHandling() 
      .authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/openid_connect_login")).and().requiresChannel().anyRequest().requiresSecure(); 
+0

"/ openid_connect_login" を試してみてください、私のランディングページです。私は今何を使うべきですか? –

+0

私の変更を試してください – mrtasln

+0

これは現在同じ問題を解決しています。 –

関連する問題