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

Uaa token provider #948

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

tareksha
Copy link

Current it is complicated to extend or mock AbstractUaaTokenProvider because it is locked by final and package-protected methods. Add an intermediate interface for UAA token providers to allow extending and mocking the UAA functionality more elegantly.

@cfdreddbot
Copy link

❌ Hey tareqhs!

All pull request submitters and commit authors must have a Contributor License Agreement (CLA). Click here for details on the CLA process.

The following github user @tareqhs is not covered by a CLA.

After the CLA process is complete, this pull request will need to be closed & reopened. DreddBot will then validate the CLA(s).

@nebhale
Copy link
Member

nebhale commented Mar 13, 2019

Can you give an example of extension and mocking that you're trying to do where the TokenProvider interface isn't sufficient? The class is designed for extension and locks down certain methods that shouldn't be overridden as they define the core behavior of the class.

@tareksha
Copy link
Author

tareksha commented Mar 13, 2019

@nebhale We have a solution that makes use of UAA-specific token data, e.g. refresh tokens. Writing wrappers and unit test is overly complicated because getToken() is locked with final and forces me to go through HttpClient flows. Also the two abstract methods are package-protected and force me to put the relevant code inside a package that is irrelevant to the project ( org.cloudfoundry.reactor.tokenprovider ).

Locking the code that much makes it actually less extensible.

@twoseat twoseat changed the base branch from master to main July 9, 2020 15:43
@dmikusa dmikusa added triaged Initial triage of issue has been performed uaa labels Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Initial triage of issue has been performed uaa
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants