, HTTP Basic:
Authorization: Basic Base64(client_id:client_secret)
. , "Basic". , "Basic", begin
Spring , , BasicAuthenticationFilter, . doFilterInteral mthod, :
if (header == null || !header.startsWith("Basic ")) {
chain.doFilter(request, response);
return;
}
Authorization, Authorization Basic, . AuthenticationException, ExceptionTranslationFilter, ExceptionTranslationFilter AuthenticationEntryPoint.
Basic Authorization, BasicAuthenticationFilter . , BasicAuthenticationFilter BasicAuthenticationEntryPoint, AuthenticationEntryPoint:
catch (AuthenticationException failed) {
SecurityContextHolder.clearContext();
if (debug) {
this.logger.debug("Authentication request for failed: " + failed);
}
this.rememberMeServices.loginFail(request, response);
onUnsuccessfulAuthentication(request, response, failed);
if (this.ignoreFailure) {
chain.doFilter(request, response);
}
else {
this.authenticationEntryPoint.commence(request, response, failed);
}
return;
}