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

Major refactoring the lower levels of the api-auth module. Enables … #1

Merged
merged 1 commit into from
Sep 20, 2018

Conversation

jenpet
Copy link
Owner

@jenpet jenpet commented Sep 20, 2018

…it to handle missing scopes for a user regarding the requesting application and allows the PKCE mechanism.

  • Drops the feign client dependencies for the login and authorization process since the workarounds and interceptors required way to much effort to enhance the code and keep it maintainable and readable. There is a new service layer between the api calls which are made within the client package and the AuthorizationFlowHandler. The different services make it easier to test and to maintain. Now okhttp3 is used to make the HTTP calls towards the web forms and authorization api in the respective clients. Special handling or mimicing is much easier for those cases when done on the lowest level possible. Tokens are still retrieved using feign clients but this will be targeted in the future since those calls are straight forward for now and not a bigger issue.
  • Domain models changed to have a simpler way of dealing with a single authentication flow. There is a single POJO holding all the information required to proceed in the process.
  • Changed the authorization flow crucial exceptions to inherit from Exception instead of RuntimeException to explicitly have them handled within the services and the main handler.
  • Mostly of the old WireMock stubbings got replaced by new use case specific ones which were recorded using WireMock in recorder mode.
  • Enhanced the config parser in mbdev-samples to allow additional parameters within a provided config file. Also when adding passing the optional argument -DconfigSuffix a different config files can be used. e.g. -DconfigSuffix=dev would result in a config file lookup mbdev-config-dev.json.
  • Outlook: Rethink the authorization POJO and the different possible consents which are currently there.

… to handle missing scopes for a user regarding the requesting application and allows the PKCE mechanism.

- Drops the feign client dependencies for the login and authorization process since the workarounds and interceptors required way to much effort to enhance the code and keep it maintainable and readable. There is a new service layer between the api calls which are made within the client package and the AuthorizationFlowHandler. The different services make it easier to test and to maintain. Now okhttp3 is used to make the HTTP calls towards the web forms and authorization api in the respective clients. Special handling or mimicing is much easier for those cases when done on the lowest level possible. Tokens are still retrieved using feign clients but this will be targeted in the future since those calls are straight forward for now and not a bigger issue.
- Domain models changed to have a simpler way of dealing with a single authentication flow.  There is a single POJO holding all the information required to proceed in the process.
- Changed the authorization flow crucial exceptions to inherit from Exception instead of RuntimeException to explicitly have them handled within the services and the main handler.
- Mostly of the old WireMock stubbings got replaced by new use case specific ones which were recorded using WireMock in recorder mode.
- Enhanced the config parser in `mbdev-samples` to allow additional parameters within a provided config file. Also when adding passing the optional argument `-DconfigSuffix` a different config files can be used. e.g. -DconfigSuffix=dev would result in a config file lookup mbdev-config-dev.json.
- Outlook: Rethink the authorization POJO and the different possible consents which are currently there.
@jenpet jenpet merged commit ff0f51c into master Sep 20, 2018
@jenpet jenpet deleted the REWRITE_LOW_LEVEL branch September 30, 2018 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant