Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting realm for Http Basic #6279

Merged
merged 1 commit into from
Dec 17, 2018

Conversation

ankurpathak
Copy link
Contributor

  1. Added method realmName in ServerHttpSecurity to allow
    specifying realm name.
  2. Added test in ServerHttpSecurityTests to check if
    specified realm name is returned.

Pull request for issue: #6270

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I provided feedback inline

* @since 5.2.0
* @author Ankur Pathak
*/
public HttpBasicSpec realmName(String realmName){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that rather than specifying realmName we should allow injection of the entryPoint instead. This gives the user more flexibility and we don't need this additional logic which does an instance of check.

Copy link
Contributor Author

@ankurpathak ankurpathak Dec 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree, allowing setting entryPoint will give user more flexibility. So method to set realmName
removed in its favour. The new method authenticationEntryPoint added in its place.

@rwinch rwinch added the status: waiting-for-feedback We need additional information before we can continue label Dec 14, 2018
1. Added method authenticationEntryPoint in ServerHttpSecurity to allow
setting authenticationEntryPoint.
2. Added test in ServerHttpSecurityTests to check if
if specified realm name set by authenticationEntryPoint is
returned

Fixes: spring-projectsgh-6270
@rwinch rwinch self-assigned this Dec 17, 2018
@rwinch rwinch added in: config An issue in spring-security-config in: web An issue in web modules (web, webmvc) Reactive type: enhancement A general enhancement and removed status: waiting-for-feedback We need additional information before we can continue labels Dec 17, 2018
@rwinch rwinch modified the milestones: 5.2.0.M2, 5.2.0.M1 Dec 17, 2018
@rwinch rwinch merged commit 3bcb1d9 into spring-projects:master Dec 17, 2018
@rwinch
Copy link
Member

rwinch commented Dec 17, 2018

Thanks for the PR @ankurpathak! This is now merged into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants