Skip to content

Commit

Permalink
fix(oauth2): Add before filter to fix basic auth (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
griffin authored and cfieber committed Sep 13, 2019
1 parent 1200a1d commit 3069283
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import org.springframework.security.web.authentication.LoginUrlAuthenticationEnt
import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
import org.springframework.session.web.http.DefaultCookieSerializer
import org.springframework.stereotype.Component
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter

import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse
Expand Down Expand Up @@ -81,6 +83,7 @@ class OAuth2SsoConfig extends WebSecurityConfigurerAdapter {
authConfig.configure(http)

http.exceptionHandling().authenticationEntryPoint(entryPoint)
http.addFilterBefore(new BasicAuthenticationFilter(authenticationManager()), UsernamePasswordAuthenticationFilter)
http.addFilterBefore(externalAuthTokenFilter, AbstractPreAuthenticatedProcessingFilter.class)
}

Expand Down

0 comments on commit 3069283

Please sign in to comment.