Skip to content

Instantly share code, notes, and snippets.

@novoj
Created February 2, 2015 19:51
Show Gist options
  • Save novoj/5f09bdc1164fbca77c21 to your computer and use it in GitHub Desktop.
Save novoj/5f09bdc1164fbca77c21 to your computer and use it in GitHub Desktop.
Quiz:
Try to replace request.getRequestURI() in #commence method with custom value retrieved from request attribute:
org.springframework.security.web.access.channel.RetryWithHttpsEntryPoint
org.springframework.security.web.access.channel.RetryWithHttpEntryPoint
Try to override org.springframework.security.web.DefaultRedirectStrategy, but reuse complex logic in org.springframework.security.web.DefaultRedirectStrategy#calculateRedirectUrl
@rwinch
Copy link

rwinch commented Feb 4, 2015

Remember proper encapsulation is important to keep code complexity down to a minimum. In general, Spring Security favors composition over inheritance. For this reason, you will not find a lot of hooks via protected methods. This is especially true in implementations of interfaces with only a single method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment