0
私はスプリングブートアプリケーションを持っていますが、jwt
に基づくステートレス認証/認証モジュールの実装が終了しました。だから、基本的に私は私が/api/authenticate
のsuccesfullの認証後に取得ベアラトークンを送信しない限り、私は401エラーを取得するURL /api/jobs
にアクセスしたい場合はスプリングブートアプリケーション(Basic&JWT)上の2つの認証メカニズム
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.exceptionHandling()
.authenticationEntryPoint(authenticationEntryPoint)
.and()
.csrf()
.disable()
.headers()
.frameOptions()
.disable()
.and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeRequests()
.antMatchers("/api/authenticate").permitAll()
.antMatchers("/api/**").authenticated()
.and()
.apply(securityConfigurerAdapter());
}
:
この
は、私は私のセキュリティモジュールの構成方法であります。それは、ログインして、基本的なHTTP認証を使用して、ベアラ・トークンを供給することなく、/api/jobs
にアクセスし、