Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.

Define plain data constructor for OAuth2AuthenticationDetails #1001

Closed
wants to merge 1 commit into from

Conversation

patope
Copy link

@patope patope commented Mar 3, 2017

OAuth2AuthenticationDetails constructor depends on HttpServletRequest. It's not possible to define jackson2 module mixin for such type. Eg. #983 cannot be resolved without jackson 2 module mixins.

imo OAuth2AuthenticationDetails(HttpServletRequest) should be deprecated and OAuth2AuthenticationDetailsSource should extract attributes from request.

@pivotal-issuemaster
Copy link

@patope Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@patope Thank you for signing the Contributor License Agreement!

@villuv
Copy link

villuv commented Aug 3, 2017

@jgrandja Any plans to merge this?

@jgrandja
Copy link
Contributor

@villuv No plans as of yet. Tests would need to be added to this PR for it to be even considered.

Also as an FYI, this project is in maintenance mode as our efforts are focused on the new OAuth 2.0/OpenID Connect 1.0 support we are building in Spring Security 5.0. We are only looking at providing bug fixes and minor enhancements going forward.

Copy link
Contributor

@jgrandja jgrandja left a comment

Choose a reason for hiding this comment

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

@patope Thanks for the PR. However, we won't be able to merge this. Please see review comment.


HttpSession session = request.getSession(false);
this.sessionId = (session != null) ? session.getId() : null;
public OAuth2AuthenticationDetails(String remoteAddress, String sessionId, String tokenType, String tokenValue) {
Copy link
Contributor

@jgrandja jgrandja May 8, 2020

Choose a reason for hiding this comment

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

OAuth2AuthenticationDetails was intended to be used with HttpServletRequest, so I don't see a reason to provide this overloaded constructor.

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

Successfully merging this pull request may close these issues.

5 participants