cogover-api-auth
Skill13 starsChanged 33 days agoMITView on GitHub
Chọn và triển khai đúng cơ chế xác thực Cogover API: API Key Bearer cho `/bapi/v{N}`, phiên Web App (cookie kèm CSRF/XSRF) cho `/api/v{N}`, đổi API Key thành phiên qua `/bapi/v1/auth-token`. Nguồn chung cho mọi skill về quản lý credential và quy ước request/response/lỗi. Dùng khi viết request Cogover API hoặc xử lý token/cookie hết hạn.
In this repository23 other files it gives its agents.
- agent-builderSkill
- app-menu-managerSkill
- build-cogover-appSkill
- cogover-custom-moduleSkill
- cogover-iconSkill
- cogover-overviewSkill
- create-cogover-objectsSkill
- dashboard-builderSkill
- document-templateSkill
- layout-scriptingSkill
- object-buttonSkill
- object-filterSkill
- object-formSkill
- object-history-trackingSkill
- object-infoSkill
- object-layoutSkill
- object-path-componentSkill
- object-recordSkill
- object-transition-ruleSkill
- process-creatorSkill
- record-emailSkill
- report-builderSkill
- user-permissionSkill
The file
Files
Cogover API Auth
- Phiên bản:
1.1.1 - Ngày phát hành:
2026-10-21
Mục tiêu
Chọn cơ chế xác thực theo URI của endpoint và tạo hướng dẫn hoặc mã mẫu tương ứng. Không giả định rằng API Key có thể gọi trực tiếp endpoint /api/v{N}.
Quy trình
Trước khi gọi API, đọc Quản lý credential và Quy ước request, response và lỗi chung. Hai mục này là nguồn chung cho mọi skill trong bộ (gồm shape response, 429, ghi không rõ kết quả, phân trang và xác nhận giao diện); skill khác chỉ ghi ngoại lệ riêng.
- Xác định chính xác URI endpoint và workspace domain.
- Chọn cơ chế xác thực theo tiền tố:
- Dùng API Key Bearer cho
/bapi/v{N}/.... - Dùng phiên Web App cho
/api/v{N}/....
- Dùng API Key Bearer cho
- Nếu chức năng chỉ có endpoint
/api/v{N}, dùng API Key gọiPOST /bapi/v1/auth-tokenđể tạo phiên trước. - Đọc references/authentication-mechanisms.md trước khi viết request hoặc mã tích hợp.
- Tạo ví dụ với placeholder như
{workspace-domain},{tokenId}-{secretToken},{HttpSessionId}. - Kiểm tra request cuối cùng theo danh sách sau:
- Đúng tiền tố endpoint và đúng cơ chế xác thực.
- Phiên Web App gửi đủ ba cookie.
- Hai header
x-csrf-tokenvàx-xsrf-tokencùng bằng cookieXSRF-TOKEN. - Có chiến lược tạo lại phiên trước khi hết hạn.
Quy tắc trả lời và triển khai
- Giải thích ngắn gọn vì sao chọn cơ chế tương ứng với URI.
- Với
/bapi, minh họa headerAuthorizationbằng placeholder. - Với
/api, trình bày cả bước tạo phiên và bước dùng phiên; không chỉ đưa riêngAuthToken. - Không suy đoán endpoint, thời hạn token hoặc chính sách quyền ngoài tài liệu tham chiếu. Nêu rõ thông tin còn thiếu nếu cần xác minh.
Kết quả mong đợi
Khi người dùng yêu cầu ví dụ hoặc tích hợp, cung cấp tối thiểu:
- Cơ chế được chọn và lý do.
- Request mẫu bằng cURL hoặc ngôn ngữ được yêu cầu.
- Cách quản lý vòng đời token/cookie.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

