콘텐츠로 이동

인증

Open API v2는 OAuth2 client_credentials 그랜트를 사용합니다. 장수명 정적 API 키는 없습니다 — 대시보드에서 발급한 크리덴셜로 15분짜리 ES256 액세스 토큰을 받아 Authorization: Bearer로 호출합니다. 유출 창을 최소화하기 위한 설계입니다.

  1. 대시보드 Developers 메뉴에서 API 클라이언트를 발급 → client_id + client_secret.
  2. POST https://auth.kolleges.net/token으로 15분 토큰 교환(서버측·매 만료마다).
  3. 토큰을 Authorization: Bearerhttps://openapi.kolleges.net/v2/… 호출.

client_id + client_secret을 HTTP Basic으로 제시합니다.

Terminal window
curl -s -u "$CLIENT_ID:$CLIENT_SECRET" \
-d 'grant_type=client_credentials' \
-d 'scope=kolleges:openapi:issuance:write' \
https://auth.kolleges.net/token
속성
알고리즘 ES256 (JWT)
수명 900초 (15분)
audience (aud) https://openapi.kolleges.net
issuer (iss) https://auth.kolleges.net
scope 요청 scope 클라이언트 등록 scope

scope는 kolleges:openapi:<operation> 네임스페이스입니다. deny-by-default — 클라이언트에 등록된 scope만 요청할 수 있고, 토큰에는 요청 ∩ 등록의 교집합만 실립니다.

scope 용도
kolleges:openapi:clubs:read 클럽 신원·발급 가능 여부
kolleges:openapi:issuance:read 발급 목록·상세·파일
kolleges:openapi:issuance:write 발급
kolleges:openapi:issuance:revoke 취소(무효화)
kolleges:openapi:achievements:read / :manage achievement 조회 / 저작
kolleges:openapi:designs:read / :manage 디자인 조회 / 저작
kolleges:openapi:billing:read 요금·엔타이틀먼트
kolleges:openapi:events:read 이벤트 피드

client_secret이 유출되었거나 주기적 교체가 필요하면 대시보드에서 회전합니다. 회전 직후에는 신·구 secret이 잠시 함께 유효하여(무중단 교체) 배포 중 토큰 발급이 끊기지 않습니다. 교체가 끝나면 이전 secret은 무효화됩니다.