Coder Social home page Coder Social logo

Comments (7)

dla-c-box avatar dla-c-box commented on September 17, 2024

From what I see, you'd add the choice in DBUserStorageProviderFactory.java (search for "bcrypt", add yours at the end of this list.)
Then in UserRepository.java -> validateCredentials, you'd see what you have to do to validate the credentials using that algorithm.
To get the jar file, the build step is here (mvn is maven, a build tool for Java).

from singular-keycloak-database-federation.

rohit-uf avatar rohit-uf commented on September 17, 2024

@dla-c-box Thanks a lot for the explanation. Actually when I am running mvn clean package in the root of my springboot project, it says "Error - --classpath needs to be specified". I am trying to find resources online to read about maven. If you could provide with some context about the same, that would be great. Thanks

from singular-keycloak-database-federation.

dla-c-box avatar dla-c-box commented on September 17, 2024

Do you already have a jdk? Otherwise, on Linux, the initial setup could look like this:
sudo apt-get update
sudo apt-get install openjdk-11-jdk
sudo apt install maven

If you are using the VScode editor, the Java extension pack is here.

from singular-keycloak-database-federation.

rohit-uf avatar rohit-uf commented on September 17, 2024

Hi @dla-c-box . I was able to successfully build and integrate the provider after changing some code. I only had to put target/ folder in the JAR file and it worked. Thanks for your help

from singular-keycloak-database-federation.

rohit-uf avatar rohit-uf commented on September 17, 2024

Hi @dla-c-box . I found a workaround for my problem. instead of implementing hashing mechanism in JAVA, I am calling an API now and sending username and password over it to validate it from my backend. Eventually I will send the password as an encrypted string.

I wrote the code in UserRepository class, in validateCredentials method and I manually put the jar files of relevant dependencies in the providers/ directory. But still I am seeing this java.lang.NoClassDefFoundError: org/springframework/util/MultiValueMap error.

Could you please help with this?

from singular-keycloak-database-federation.

dla-c-box avatar dla-c-box commented on September 17, 2024

Did you add a reference to MultiValueMap in your source code? If so, remove it and, if it was used, replace it with native Java classes instead.

from singular-keycloak-database-federation.

rohit-uf avatar rohit-uf commented on September 17, 2024

Hi @dla-c-box. Yes I have added the reference to that. But I also need WebClient from spring-starter-webflux package. Can I not use the springframework package?

I copied the jar for spring-starter-webflux package in the providers/ folder and then ran kc.sh start-dev command. Is there any way of using this package along with keycloak

Edit: I ran the mvn clean package command and it generated some more JAR files in the dist/ directory. I used that and it worked

from singular-keycloak-database-federation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.