프로젝트 인증은 단기 RS256 액세스 토큰과 불투명 회전 새로 고침 토큰을 발행합니다. 세션 정책은 프로젝트별로 구성됩니다.
#토큰 모델
| 토큰 | 형식 | 사용 |
|---|---|---|
| 액세스 토큰 | RS256 JWT | 사용자 보호 애플리케이션 API 호출 |
| 토큰 새로고침 | Opaque halo_rt_… | 세션 순환 |
| 공급업체 로그인 코드 | 일회성 불투명 코드 | 소셜 로그인을 완료하세요 |
| OAuth 앱 토큰 | RS256 JWT + 불투명 새로고침 | 서비스 범위 액세스 |
#회전 새로 고침
curl -X POST \
"https://api.agihalo.com/api/v1/auth/token?grant_type=refresh_token" \
-H "apikey: $HALO_PROJECT_PUBLISHABLE_KEY" \
-H "Content-Type: application/json" \
-d '{
"refresh_token": "halo_rt_..."
}'#액세스 토큰 확인
GET
/api/v1/auth/.well-known/jwks.json게시 가능 키 헤더를 사용하여 프로젝트 공개 JWK를 가져오고 잠시 캐시합니다. 다음 사항을 모두 확인하세요.
- 알고리즘은
RS256및 JWT입니다.kid는 JWK와 일치합니다. - 발행자는
halo-project:{projectId}. - 대상은 프로젝트 사용자의 경우
halo-project-auth입니다. 토큰. tokenUse는project_auth_access.- 만료일, 프로젝트 ID, 제목, 세션 ID, 이메일이 존재합니다.
GET
/api/v1/auth/userResolve a valid bearer access token to the current user. Send the matching Project publishable key as apikey.
#해지
POST
/api/v1/auth/logoutLogout also requires the matching Project publishable key and user bearer token. The managed SDK sends both and clears its local session.
프로젝트 소유자는 활성 세션을 나열하고 대시보드에서 개별 세션을 취소할 수도 있습니다. 사용자를 금지하거나 삭제하면 향후 세션 검증을 사용할 수 없습니다.