Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casdoor/casdoor-spring-security-react-example
Spring Security (via Filter) example app integrated with Casdoor
https://github.com/casdoor/casdoor-spring-security-react-example
auth authentication authn casbin casdoor iam spring spring-security sso
Last synced: 17 days ago
JSON representation
Spring Security (via Filter) example app integrated with Casdoor
- Host: GitHub
- URL: https://github.com/casdoor/casdoor-spring-security-react-example
- Owner: casdoor
- License: apache-2.0
- Created: 2022-09-03T15:59:18.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-08T06:02:43.000Z (over 1 year ago)
- Last Synced: 2024-11-14T06:28:49.236Z (3 months ago)
- Topics: auth, authentication, authn, casbin, casdoor, iam, spring, spring-security, sso
- Language: Java
- Homepage: https://casdoor.org/docs/integration/spring-security/spring-security-filter
- Size: 194 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```shell
git clone https://github.com/casdoor/casdoor-spring-security-react-example
```Then, download the corresponding Maven dependency and front-end dependency respectively.
```shell
# backend
mvn dependency:resolve# frontend
cd webyarn 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.
```yaml
server:
port: 8080
casdoor:
endpoint: http://localhost:8000
client-id:
client-secret:
certificate:
organization-name:
application-name:
redirect-url: /callback
```- Second, you only need to configure the 6 parameters in `web/src/Setting.js`.
```js
export const ServerUrl = "http://localhost:8080";
const sdkConfig = {
serverUrl: "http://localhost:8000",
clientId: "",
appName: "",
organizationName: "",
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`.