PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, September 4, 2022

[FIXED] How to customize sso(single sign on) by keycloak?

 September 04, 2022     api, authentication, java, keycloak, single-sign-on     No comments   

Issue

sorry for my poor english... I 'll do my best to write question.

Basically, keycloak provide loginPage where login form has a some name and value parameter determined by keycloak (forexample session_code, excustion, client_id, tab_id). this way is Server side randering(SSR).

However, I want to login process with keycloak in API way. In this case, it's not possible to use those parameter.

How to use apis below to login?

enter code here:8180/auth/realms/{realm}/login-action/authenticate enter code here:8180/auth/realms/{realm}/protocol/openid-connect/certs enter code here:8180/auth/realms/{realm}/protocol/openid-connect/token


Solution

It's not a good practice from the security point of view to host your login page somewhere else. It would be better to allow Keycloak to have control over the login process so that the integrity of the overall process would be kept. But in case you really need to do that, you can have your own UI hosted somewhere else and send the credentials you received from the user to the Keycloak via OAuth password grant type. It's not recommended and is going to be deprecated. I suggest you to check the recommended approaches mentioned here.



Answered By - zaerymoghaddam
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing