duosecurity / duo_universal_java

Duo OIDC-based two-factor authentication for Java web applications
https://duo.com/docs/duoweb
Other
14 stars 21 forks source link

Upgrade dependencies, docs and remove unused imports #3

Closed mmoayyed closed 4 years ago

mmoayyed commented 4 years ago

This pull request:

  1. Clarifies the project JDK requirement (JDK 11 cannot be used to build)
  2. Upgrade a number of dependencies including SB
  3. Sets the scope for lombok to be compile so as to not have it leak in the final published pom.
  4. Removes all unused imports.
mmoayyed commented 4 years ago

To clarify, tests under JDK11 fail as such:

Caused by: java.lang.IllegalStateException: Error during attachment using: net.bytebuddy.agent.ByteBuddyAgent$AttachmentProvider$Compound@be0bf9ee
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.io.IOException: Can not attach to current VM

[ERROR] exchangeAuthorizationCodeFor2FAResult_network_failure  Time elapsed: 0 s  <<< ERROR!
java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker
    at com.duosecurity.service.DuoConnectorTest.exchangeAuthorizationCodeFor2FAResult_network_failure(DuoConnectorTest.java:87)
Caused by: java.lang.IllegalStateException: Failed to load interface org.mockito.plugins.MockMaker implementation declared in java.lang.CompoundEnumeration@5023bb8b
Caused by: org.mockito.exceptions.base.MockitoInitializationException: 

Could not initialize inline Byte Buddy mock maker. (This mock maker is not supported on Android.)
vbscott commented 4 years ago

Thank you for your PR. Unfortunately the changes to duo-example/pom.xml cause problems with duo-example. We can't directly merge in this diff, due to our internal repository configuration, but I can add the rest of your changes in. We can also look into the duo-example/pom.xml changes in a future PR/issue.

mmoayyed commented 4 years ago

No worries, thanks for the review and update. I am curious; did you cherry-pick commits from this PR when you merged? Not an issue at all in any way, but I would have thought that my name and commit/changes would show up in the commit log here?

mmoayyed commented 4 years ago

Ah never mind; sorry. I see how that might not have been possible. Thanks again!