The documentation says : Note: Okta SDKs support creating and signing the JWT and requesting an access token. If you are using an Okta SDK, you can skip this section and the Get an access token section.
Can anyone pls show an example of Java code how this can be done using Okta-java-sdk?
I was able to execute a stand along maven project which has only dependency as below and was able to connect to an Okta application and get list of users.
When I try to include these dependencies in my existing project I get below error.
Caused by: java.lang.SecurityException: class “org.bouncycastle.openssl.PEMException”'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:898) ~[?:1.8.0_121]
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668) ~[?:1.8.0_121]
at java.lang.ClassLoader.defineClass(ClassLoader.java:761) ~[?:1.8.0_121]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[?:1.8.0_121]
at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[?:1.8.0_121]
at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[?:1.8.0_121]
at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[?:1.8.0_121]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[?:1.8.0_121]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[?:1.8.0_121]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121]
at org.bouncycastle.openssl.PEMParser.(Unknown Source) ~[bcpkix-jdk15on-1.70.jar:1.70.00.0]
What does this error mean?
I even excluded bcpkix-jdk15on from two dependencies spring-cloud-starter-config and spring-cloud-starter-bus-amqp.