Hi,
I have Django application which is using a djangorestframework to create restful api. I would like to integrate user system for authentication with keycloak. I am not getting anywhere, can anybody please give me advise, how to integrate authenticate system with keycloak.
It’s probably the URL of the page before you click on “Sign In”. Open the Developer Tools in your browser and choose the Network tab. After you click on “Sign In”, look for a request to the Keycloak server that contains a request with a redirect_uri parameter in the request. That will tell you what the browser is setting it to. Then you have to make sure that is in the “Valid redirect URIs” section of the Client you set up in Keycloak.
Hello! We are implementing Keycloak on our Django application, over Django REST Framework (DRF).
There are a few things I’d like to point out:
If you are going to work with Session and want to integrate your Django users with Keycloak (KC), mozilla-django-oidc will work and it is the easiest and better one from all the libraries we configured.
If you are going to work with APIs and but not with Django users, only authenticating in KC, you should use Python Keycloak. Python KC implements most of the Keycloak REST APIs, which will save you from doing a lot of hand work to put up methods and functions.
Their documentation aren’t that extensive, but you can figure out most things reading their code and cross referencing with KC REST docs 1.
If you are going to work both with Browser Flow (sessions, I believe) and API authentication/authorization via tokens, I cannot help much because we are only integrating it with tokens. But I believe Python KC can suffice this too.
I’m not sure if Python KC has everything from the new API implemented, so double check both 21 1 and 20 2 versions. We are based in KC 20.