最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin development - Using custom IDP with WP

programmeradmin1浏览0评论

I got a client and they have a custom made IDP now they are moving to WordPress from Blogger and I made the full setup for the new WP site. Now they want the logins to be made from the IDP and not in the WP site. I tried many plugins but none of them worked. As I have some experience in plugin development I am planning to create a new plugin. But I have some doubts hope someone would help me.

  1. When a user clicks login in WP he should be redirected to the IDP login page with some identifiers. How can I do this? (I guess customizing wp-login will work but I’m unable to find any hook for that)

  2. Then once the user successfully logs-in in the IDP the user is redirected to a Callback URL with some identifiers. How can I create a callback page? Which hooks should I use?

  3. Finally after the user reaches the callback page the script communicates with the server and gets the credentials for logging in. Here how to check if the user is already registered in WP (that is already logged-in at least once) and how to register if not. If yes how to login the user.

Thanks in advance!!!

EDIT: (Replying to @Rup's comment) The process of connecting and authorizing with the IDP is as follows.

Client - WP User - The user who logs in IDP - Identity Provider

  1. client requests to IDP with client token and pass
  2. IDP gives some identifiers for the session
  3. user is redirected by the client with the identifiers
  4. user logs-in with IDP
  5. user gets redirected with some new set of identifiers to the client's pre-specified callback URL
  6. client makes a request to the IDP with new identifiers requesting credentials
  7. IDP gives email ID and client and user-specific Username, Password
  8. client should login with the details given.
发布评论

评论列表(0)

  1. 暂无评论