Skip to content

Commit

Permalink
feat(server): complete laf server auth api. (#421)
Browse files Browse the repository at this point in the history
* feat(server): complete laf server auth api.

Signed-off-by: maslow <wangfugen@126.com>
  • Loading branch information
maslow authored Nov 21, 2022
1 parent 921f40e commit fd4923f
Show file tree
Hide file tree
Showing 30 changed files with 748 additions and 336 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"compat",
"containerd",
"creationforms",
"datasource",
"dockerode",
"EJSON",
"entrypoint",
Expand Down
40 changes: 39 additions & 1 deletion server/.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,45 @@

# database
DATABASE_URL=postgresql://adm1n:passw0rd@localhost:5432/sys_db?schema=public

# jwt settings
JWT_SECRET=abc123
JWT_EXPIRES_IN=7d

# casdoor settings
CASDOOR_ENDPOINT=http://localhost:30070
CASDOOR_ORG_NAME=built-in
CASDOOR_APP_NAME=app-built-in
CASDOOR_CLIENT_ID=a71f65e93723c436027e
CASDOOR_CLIENT_SECRET=0d7e157be08055867b81456df3c222ea7c68a097
CASDOOR_REDIRECT_URI=http://localhost:3000/v1/code2token
CASDOOR_PUBLIC_CERT=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUUzVENDQXNXZ0F3SUJBZ0lEQWVKQU1BMEdDU3FHU0liM0RRRUJDd1VBTUNneERqQU1CZ05WQkFvVEJXRmsKYldsdU1SWXdGQVlEVlFRREV3MWpaWEowTFdKMWFXeDBMV2x1TUI0WERUSXlNVEV4TURFeU16UXdNRm9YRFRReQpNVEV4TURFeU16UXdNRm93S0RFT01Bd0dBMVVFQ2hNRllXUnRhVzR4RmpBVUJnTlZCQU1URFdObGNuUXRZblZwCmJIUXRhVzR3Z2dJaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQ0R3QXdnZ0lLQW9JQ0FRRElQdXdWbzVlcHBnM0EKQW4vUGd3TGMyZmp6aHB1SkpPUGF1cjlyclJoL0Q1b1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