I was trying out this SDK GitHub - okta/okta-hooks-sdk-java: Okta Hooks SDK for Java which is really awesome. However, find out PasswordImport is not supported in the version 0.1.0. Is there a release version is available with the support for PasswordImport hook?
Or is there another SDK that we have to use here?
Thanks
Vinny
Hello,
There is password hook support.
I have never tested it but the implementation looks like all you need to do is either passwordImportVerified() or passwordImportUnverified() for the return.
The small sample here show a Controller that accepts a RequestBody for a user registration. You could use the same code for a password hook and just change the return type depending on if the password matches, for example:
Thanks a lot for the prompt response. Can you hare the version you are using here? I am finding 0.1.0 as the latest version and not able to find it. Is there another version available?
0.1.0 is currently the only version. The GH repository does not show a sample of the password import hook, and I realize the one I supplied was mistyped. Should have been,
I have cloned repository and modified the sample application with the password import hook. The sample app can be found here.
git clone https://github.com/emanor-okta/okta-hooks-sdk-java
cd okta-hooks-sdk-java/examples/spring-boot
run the sample
The endpoint will be http://localhost:8080/pass-import assuming you don’t change the port.
Running the following Curl command should return a verified.
Thanks, Erik. Sounds like we either need to fork the project a build a new version with the password import hook and use that as a dependency or copy the source code to our project. Do you know when a newer version will be available? Any reason not release the passwordimport hook changes? Thanks again for helping us here.
I don’t know of a planned build.
Please note that I simply forked the project so I could modify the sample application to expose the password import hook. I did not add this functionality into the project, that already exists.
I just thought it might be easier to see how the hook functionality worked if it was added to the sample application.