diff --git a/README.MD b/README.MD index 7c167c9..aa2eb85 100644 --- a/README.MD +++ b/README.MD @@ -183,6 +183,7 @@ cd /export/data sqlite3 cas.db ``` +[//]: # (todo:这部分要修改) - **cas的service** - authorization_code | client_credentials | device_flow模式: ```txt diff --git a/cfg-docker.json b/cfg-docker.json new file mode 100644 index 0000000..70b3be1 --- /dev/null +++ b/cfg-docker.json @@ -0,0 +1,26 @@ +{ + "logger": { + "dir": "logs/", + "level": "DEBUG", + "keepHours": 24 + }, + "endpoints": { + "authorization": "http://localhost/oauth2/authorize", + "token": "http://oauth-server-lite/oauth2/token", + "userinfo": "http://oauth-server-lite/oauth2/userinfo", + "device_authorization": "http://oauth-server-lite/oauth2/device/authorize" + }, + "iplimit": { + "enable": false, + "trust_ip": ["127.0.0.1", "::1"] + }, + "http": { + "route_base":"/", + "trust_proxy": ["127.0.0.1", "::1"], + "cors": ["http://127.0.0.1","http://localhost"], + "listen": "0.0.0.0:8080" + }, + "trust_domain": ["api.ecnu.edu.cn", "localhost", "oauth-server-lite"], + "default_scope": "Basic", + "timeout": 10 +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index abe3a90..17cb6db 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,24 +1,28 @@ version: '3' services: + redis: + image: redis:latest + container_name: oauth-redis + ports: + - "6379:6379" open-oauth2playground: - image: lacey620/open-oauth2playground:v1.0 + image: open-oauth2playground:v2.0 container_name: open-oauth2playground restart: always ports: - - "8080:80" + - "8085:8080" volumes: - - ./cfg.json:/app/Open-OAuth2Playground/cfg.json + - ./cfg-docker.json:/app/Open-OAuth2Playground/cfg.json command: ["/app/Open-OAuth2Playground/OAuth2Playground"] - cas-demo: - image: lacey620/cas-demo:v6.5.9 - container_name: cas-demo + oauth-server-lite: +# image: ecnunic/oauth-server-lite:v1.0 + image: lite-server-test:0716 + container_name: oauth-server-lite + depends_on: + - redis restart: always - ports: - - "8444:8444" environment: - - CAS_SERVER_NAME= - - SERVER_PORT= - volumes: - - ./cas_init_script.sh:/cas-overlay/cas_init_script.sh - entrypoint: ["/bin/bash", "-c"] - command: ["/cas-overlay/cas_init_script.sh && java -server -noverify -Xmx2048M -jar /cas-overlay/cas.war"] \ No newline at end of file + - CLIENT_HOST=127.0.0.1 + ports: + - "80:80" + - "8444:8444" \ No newline at end of file