Giter Site home page Giter Site logo

casdoor / casdoor-spring-security-react-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 199 KB

Spring Security (via Filter) example app integrated with Casdoor

Home Page: https://casdoor.org/docs/integration/spring-security/spring-security-filter

License: Apache License 2.0

Java 59.08% HTML 5.17% CSS 2.79% JavaScript 32.96%
auth authentication authn casbin casdoor iam spring spring-security sso

casdoor-spring-security-react-example's Introduction

casdoor-spring-security-react-example

A silent sign-in example is implemented through spring security and casdoor react SDK.

Installation:

First, you need to clone the repository.

git clone https://github.com/casdoor/casdoor-spring-security-react-example

Then, download the corresponding Maven dependency and front-end dependency respectively.

# backend
mvn dependency:resolve

# frontend
cd web

yarn install
or 
npm install

Next, you need to configure two places.

  • First, only 7 parameters in src/main/resources/application.yml need to be configured.

    server:
        port: 8080
    casdoor:
        endpoint: http://localhost:8000
        client-id: <your client id>
        client-secret: <your client secret> 
        certificate: <your certificate>
        organization-name: <your organization name>
        application-name: <your application name>
        redirect-url: <your frontend url>/callback
  • Second, you only need to configure the 6 parameters in web/src/Setting.js.

    export const ServerUrl = "http://localhost:8080";
    
    const sdkConfig = {
      serverUrl: "http://localhost:8000",
      clientId: "<your client id>",
      appName: "<your application name>",
      organizationName: "<your organization name>",
      redirectPath: "/callback",
    };

Start

First, run the mvn package command in the project root directory.

Then enter the target directory and execute the java -jar example-0.0.1-SNAPSHOT.jar command.

Finally, enter the web directory and execute the command yarn start.

casdoor-spring-security-react-example's People

Contributors

hsluoyz avatar selflocking avatar wenxuan70 avatar

Watchers

 avatar  avatar  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.