--
這是 Google 網路論壇針對「NYCU NASA 課程討論區」群組發送的訂閱通知郵件。
如要取消訂閱這個群組並停止接收來自這個群組的郵件,請傳送電子郵件到 nctunasa+u...@googlegroups.com。
如要查看這個討論,請前往 https://groups.google.com/d/msgid/nctunasa/9b6ed30d-c6d2-4bf7-9331-cb2a26fa7476n%40googlegroups.com。



一開始我在 VM 上,用和 OJ 一樣的 SA_MAS_CLIENT_ID / SA_MAS_CLIENT_SECRET,先用 client credentials flow 拿 token:
POST https://mas.112550039.cs.nycu/oauth2/token
grant_type=client_credentials
scope=urn:mas:admin
這個請求是 HTTP 200,可以拿到 "access_token"、"token_type":"Bearer"、"scope":"urn:mas:admin" 等欄位,代表 client credentials flow 本身是 OK 的。但是在那個時候,只要帶著這顆 token 去打 MAS Admin API,包含:
GET https://mas.112550039.cs.nycu/api/admin/v1/users
GET https://mas.112550039.cs.nycu/api/admin/v1/version
GET https://mas.112550039.cs.nycu/api/admin/v1/server
這三個我測的 Admin API 路徑,全部都是 HTTP 404,body 是 HTML。
token 是有效的,但當時我這個 MAS 版本下面,admin API 幾乎都沒有對應的 REST endpoint。
