Skip to content

Custom Access Denied Handler? #141

Answered by ch4mpy
missbaloo asked this question in Q&A
Discussion options

You must be logged in to vote

To understand all the extensions points for spring-addons-starter-oidc, start with the Spring Boot imports resource.

In the case of a servlet resource server, this will point you to SpringAddonsOidcResourceServerBeans. The first bean defined there is the SecurityFilterChain and is rather decently documented.

You should notice a httpPostProcessor parameter which is advertised as a "Hook to override all or part of HttpSecurity auto-configuration". So basically, if you expose a ResourceServerHttpSecurityPostProcessor bean, you can alter auto-configuration the way you like:

@Bean
ResourceServerHttpSecurityPostProcessor resourceServerHttpSecurityPostProcessor() {
	return (HttpSecurity httpSecu…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@missbaloo
Comment options

Answer selected by missbaloo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants