Skip to content

Refactor Servlet/Server BearerExchangeFilterFunction #7353

Closed
@jgrandja

Description

@jgrandja

Related #7330

I'd like to propose the following changes before this goes RC1:

ServletBearerExchangeFilterFunction

  • Move from package org.springframework.security.oauth2.server.resource.web to org.springframework.security.oauth2.server.resource.web.reactive.function.client - this aligns with packaging for ServletOAuth2AuthorizedClientExchangeFilterFunction and ExchangeFilterFunction
  • Make class final
  • Make defaultRequest() private
  • I'm wondering if we need to expose authentication(Authentication authentication) - isn't it sufficient just to look up in ThreadLocal? What is the use case where this would be set other than what's in the ThreadLocal?
  • I think if getOAuth2Token() returns null the filter will fail? It doesn't seem like we have a test for this?

ServerBearerExchangeFilterFunction

  • Apply the same (applicable) changes as ServletBearerExchangeFilterFunction

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions