Code Monkey home page Code Monkey logo

wordpress-casdoor-plugin's Introduction

wordpress-casdoor-plugin

This plugin is designed and developed for use with casdoor. After activating the plugin, it will replace standard WordPress login forms with one powered by casdoor.

Installation

This plugin has not been published to wordpress plugin store, so you need to download this plugin, and move it to the wp-content/plugins directory manaully.

Get started

First, activate this plugin as an admin, this will add a new section about casdoor to your settings page.

Because this plugin is a client of casdoor. So you need to run a casdoor program, create a application and add http://your-wordpress-domain/?auth=casdoor to the Redirect URLs list of your casdoor application.

Then click on this new section and set up your casdoor plugin, this mainly involves the following settings.

  • Activate Casdoor: If this radio box is checked, the default login form will be replaced.
  • Client ID: the client id of your casdoor application.
  • Client Secret: the client secret of your casdoor application.
  • Backend URL: The address of the computer running your casdoor program:the backend port.
  • Organization: This is a setting for casdoor-php-sdk, you can ignore it now.
  • Redirect to the dashboard after signing in: If this radio box is checked, after logging in, the user will be redirected to the dashboard page.
  • Restrict flow to log in only: If this radio box is checked, casdoor will not insert user's information to wordpress's wp_users table.In other words, casdoor users that do not exist in the wordpress will not be able to login.
  • Auto SSO for users that are not logged in: If this radio box is checked, the user will be redirected to the login page, even if the page the user visits does not require a login.

After successfully setting up this plugin, all login requests sent to login.php will be redirected to casdoor application.

workflow

After the username/email, password you entered is verified by casdoor, there may be two situations. Casdoor will try to find the corresponding user, if the user exists in wordpress, casdoor will login as this user, otherwise it will insert the user's information to the wp_users table of wordpress, then login as this user.

TODOS

  • Integrate php-casdoor-sdk
  • Publish this plugin to wordpress
  • Display warning and error messages

wordpress-casdoor-plugin's People

Contributors

basakest avatar hsluoyz avatar

Watchers

 avatar

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.