# 資訊服務統整 ## 需求 ### SA0 (SA Oauth 學生會) - Google、Microsoft Oauth - 符合 Oauth 2.0 規範 - Service 用 JWT 去驗證 User - 各Service的權限控管由自己Service負責,SAO只負責存放User資料 - 限定 mail.ncue.edu.tw / gm.ncue.edu.tw 的才能登入 #### Oauth Figure [OAuth 2.0 授權流程](https://ithelp.ithome.com.tw/m/articles/10291817) ![image](https://hackmd.io/_uploads/SJVd0jljJg.png) https://fufong79570.medium.com/%E5%BE%9Egoogle%E7%AC%AC%E4%B8%89%E6%96%B9%E7%99%BB%E5%85%A5%E7%9C%8Boauth2-0-9ed2a98a5e98 #### Database Design 1. User Table + 學號 + 姓名 + Status + ... 2. Link Table + 學號(Foreign Key) + Link type + Mail + Status #### Implement 1. User Login 2. Service send request -> Auth Server 3. Auth Server check user's information 4. If not Login 1. Redirect to Google login 2. Google give auth code and user info 5. After login 6. Auth server give JWT to user to access service ## 待開發 ### :sleepy: :tea: :question: ### :microphone: :dog: