Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call a REST API secured by keycloak from a desktop app #3

Open
celsofranssa opened this issue Nov 16, 2017 · 2 comments
Open

Call a REST API secured by keycloak from a desktop app #3

celsofranssa opened this issue Nov 16, 2017 · 2 comments

Comments

@celsofranssa
Copy link

Hello,
Thanks a lot for the great tutorial on keycloak.

Could you help me a little more?
I have a REST API implemented in Spring Boot and a Desktop app that makes HTTP calls to this api.
My question is: how can my application log in to my api using keycloak?

Thank you very much.

@dominikguhr
Copy link

dominikguhr commented Mar 1, 2018

@ceceu You could do that by calling the oidc-endpoints directly. you have to allow direct access grants in your clients, then you could call the /auth, /userinfo etc.-endpoints of the realm (see realm configuration => openid connect endpoint configuration - its a hidden link! ;) ) directly and use the token you get in the Authorize header you have to send when calling your Rest API from your desktop api.

Knowing that this is an old thread, one thing for @sebastienblanc : Thanks for your screencast today ;) I implemented the very same thing as you did, actually based on your post back then, but with p3 and a little more beauty. I made a 3-part blog series out of them, available in german at our blog - I don't want to propagate here. You can find the repos in my github account. feel free to use them. I am still trying to translate my posts to english (we have an english blog, too), but ... time ;)

@Pinguwien
Copy link

okay, damnit. wrong account used :) you can find the repo with frontend, backend and mail-service in MY account ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants