identity

인증·me·PAT·OAuth/OIDC·well-known

10 operations — 인증·me·PAT·OAuth/OIDC·well-known

GET /.well-known/jwks.json

authGetWellKnownJwksJson

AX Hub 발급 JWT 의 서명 검증용 public JWK 목록.

  • 호출 권한: public. 인증 불필요 (verify endpoint).
  • 응답에는 active + grace window (31일) 의 public 키만 포함. 회전 후 31일은 구 키로 서명된 JWT 도 검증됨.
  • Cache-Control: public, max-age=3600 헤더 set — 클라이언트가 1시간 캐시.
  • 부수 효과 없음 (read-only).
언어호출
nodesdk.identity(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthGetWellKnownJwksJson(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authGetWellKnownJwksJson(pathParams, query, body) — 비동기: authGetWellKnownJwksJsonAsync(…) → CompletableFuture
kotlinclient.identity.authGetWellKnownJwksJson(pathParams, query, body) — suspend
pythonclient.identity.auth_get_well_known_jwks_json(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_get_well_known_jwks_json(path_params: …, query: …, body: …)
공통request("authGetWellKnownJwksJson", pathParams, query, body)

응답 — 200 · JWK Set

이름타입설명
keysarray<object>Keys 는 verify 에 사용 가능한 public JWK 목록 (active + grace window 의 키).

에러 status: 500에러 처리

GET /.well-known/oauth-authorization-server

authGetWellKnownOauthAuthorizationServer

OpenID Connect Discovery 1.0 의 표준 metadata. Authorization Server endpoint URL + 지원 기능 광고.

  • 호출 권한: public. 인증 불필요.
  • 응답은 부팅 시 issuer URL 로 생성된 static doc — 매 호출 동일.
  • 클라이언트 SDK 가 이 doc 로 /oauth/authorize, /oauth/token, /oauth/userinfo, /.well-known/jwks.json 위치를 자동 발견.
  • 부수 효과 없음 (read-only).
언어호출
nodesdk.identity(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthGetWellKnownOauthAuthorizationServer(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authGetWellKnownOauthAuthorizationServer(pathParams, query, body) — 비동기: authGetWellKnownOauthAuthorizationServerAsync(…) → CompletableFuture
kotlinclient.identity.authGetWellKnownOauthAuthorizationServer(pathParams, query, body) — suspend
pythonclient.identity.auth_get_well_known_oauth_authorization_server(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_get_well_known_oauth_authorization_server(path_params: …, query: …, body: …)
공통request("authGetWellKnownOauthAuthorizationServer", pathParams, query, body)

응답 — 200 · OIDC discovery

이름타입설명
authorizationEndpoint (wire: authorization_endpoint)stringAuthorizationEndpoint 는 /oauth/authorize.
codeChallengeMethodsSupported (wire: code_challenge_methods_supported)array<string>CodeChallengeMethodsSupported 는 PKCE method (S256).
grantTypesSupported (wire: grant_types_supported)array<string>GrantTypesSupported 는 지원 grant_type.
idTokenSigningAlgValuesSupported (wire: id_token_signing_alg_values_supported)array<string>IDTokenSigningAlgValuesSupported 는 id_token 서명 algorithm (RS256).
issuerstringIssuer 는 토큰의 iss claim. 본 hub 의 public URL.
jwksUri (wire: jwks_uri)stringJWKSURI 는 /.well-known/jwks.json.
registrationEndpoint (wire: registration_endpoint)stringRegistrationEndpoint advertises RFC 7591 Dynamic Client Registration when the MCP DCR launch gate is enabled. Omitted otherwise so clients do not attempt public writes against disabled deployments.
resourceIndicatorsSupported (wire: resource_indicators_supported)booleanResourceIndicatorsSupported advertises RFC 8707 resource parameter support.
responseTypesSupported (wire: response_types_supported)array<string>ResponseTypesSupported 는 지원 response_type (code 만).
revocationEndpoint (wire: revocation_endpoint)stringRevocationEndpoint 는 /oauth/revoke.
scopesSupported (wire: scopes_supported)array<string>ScopesSupported 는 지원 scope.
subjectTypesSupported (wire: subject_types_supported)array<string>SubjectTypesSupported 는 sub claim 형태 (public).
tokenEndpoint (wire: token_endpoint)stringTokenEndpoint 는 /oauth/token.
tokenEndpointAuthMethodsSupported (wire: token_endpoint_auth_methods_supported)array<string>TokenEndpointAuthMethodsSupported 는 /oauth/token 의 client 인증 방식.
userinfoEndpoint (wire: userinfo_endpoint)stringUserInfoEndpoint 는 /oauth/userinfo.

GET /.well-known/openid-configuration

authGetWellKnownOpenidConfiguration

OpenID Connect Discovery 1.0 의 표준 metadata. Authorization Server endpoint URL + 지원 기능 광고.

  • 호출 권한: public. 인증 불필요.
  • 응답은 부팅 시 issuer URL 로 생성된 static doc — 매 호출 동일.
  • 클라이언트 SDK 가 이 doc 로 /oauth/authorize, /oauth/token, /oauth/userinfo, /.well-known/jwks.json 위치를 자동 발견.
  • 부수 효과 없음 (read-only).
언어호출
nodesdk.identity(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthGetWellKnownOpenidConfiguration(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authGetWellKnownOpenidConfiguration(pathParams, query, body) — 비동기: authGetWellKnownOpenidConfigurationAsync(…) → CompletableFuture
kotlinclient.identity.authGetWellKnownOpenidConfiguration(pathParams, query, body) — suspend
pythonclient.identity.auth_get_well_known_openid_configuration(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_get_well_known_openid_configuration(path_params: …, query: …, body: …)
공통request("authGetWellKnownOpenidConfiguration", pathParams, query, body)

응답 — 200 · OIDC discovery

이름타입설명
authorizationEndpoint (wire: authorization_endpoint)stringAuthorizationEndpoint 는 /oauth/authorize.
codeChallengeMethodsSupported (wire: code_challenge_methods_supported)array<string>CodeChallengeMethodsSupported 는 PKCE method (S256).
grantTypesSupported (wire: grant_types_supported)array<string>GrantTypesSupported 는 지원 grant_type.
idTokenSigningAlgValuesSupported (wire: id_token_signing_alg_values_supported)array<string>IDTokenSigningAlgValuesSupported 는 id_token 서명 algorithm (RS256).
issuerstringIssuer 는 토큰의 iss claim. 본 hub 의 public URL.
jwksUri (wire: jwks_uri)stringJWKSURI 는 /.well-known/jwks.json.
registrationEndpoint (wire: registration_endpoint)stringRegistrationEndpoint advertises RFC 7591 Dynamic Client Registration when the MCP DCR launch gate is enabled. Omitted otherwise so clients do not attempt public writes against disabled deployments.
resourceIndicatorsSupported (wire: resource_indicators_supported)booleanResourceIndicatorsSupported advertises RFC 8707 resource parameter support.
responseTypesSupported (wire: response_types_supported)array<string>ResponseTypesSupported 는 지원 response_type (code 만).
revocationEndpoint (wire: revocation_endpoint)stringRevocationEndpoint 는 /oauth/revoke.
scopesSupported (wire: scopes_supported)array<string>ScopesSupported 는 지원 scope.
subjectTypesSupported (wire: subject_types_supported)array<string>SubjectTypesSupported 는 sub claim 형태 (public).
tokenEndpoint (wire: token_endpoint)stringTokenEndpoint 는 /oauth/token.
tokenEndpointAuthMethodsSupported (wire: token_endpoint_auth_methods_supported)array<string>TokenEndpointAuthMethodsSupported 는 /oauth/token 의 client 인증 방식.
userinfoEndpoint (wire: userinfo_endpoint)stringUserInfoEndpoint 는 /oauth/userinfo.

POST /api/v1/apps/{appID}/oauth-clients

authPostApiV1AppsByAppIDOauthClients

path 의 앱에 새 OAuth client 를 등록한다. confidential client 는 raw client_secret 이 최초 응답에만 포함됨 (이후 미노출).

  • 호출 권한: 앱 소유자 또는 같은 테넌트의 active tenant_admin (usecase 안에서 gate — 아니면 403).
  • appID 가 UUID 형식이 아니면 400. body JSON 형식이 아니면 400. type/auth_method/grant_type 형식 오류 시 400.
  • confidential client 인데 auth_method=none 이거나 그 반대면 400 (ErrAuthMethodMismatch / ErrConfidentialMissingSecret / ErrPublicHasSecret).
  • 부수 효과: oauth_clients row insert. confidential 이면 client_secret 의 hash 만 저장 (응답의 raw 값을 클라이언트가 저장해야 함).
언어호출
nodesdk.apps.oauthClients(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthPostApiV1AppsByAppIDOauthClients(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authPostApiV1AppsByAppIDOauthClients(pathParams, query, body) — 비동기: authPostApiV1AppsByAppIDOauthClientsAsync(…) → CompletableFuture
kotlinclient.identity.authPostApiV1AppsByAppIDOauthClients(pathParams, query, body) — suspend
pythonclient.identity.auth_post_api_v1_apps_by_app_id_oauth_clients(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_post_api_v1_apps_by_app_id_oauth_clients(path_params: …, query: …, body: …)
공통request("authPostApiV1AppsByAppIDOauthClients", pathParams, query, body)

Path 파라미터pathParams 로 전달

이름타입설명
appID 필수string앱 UUID

Request Bodybody 로 전달, wire 키(snake_case) 그대로

이름타입설명
allowed_grant_typesarray<string>AllowedGrantTypes 는 허용된 grant_type. authorization_code / refresh_token / urn:ietf:params:oauth:grant-type:device_code.
allowed_resourcesarray<string>AllowedResources 는 이 client 가 RFC 8707 resource 파라미터로 요청 가능한 audience 목록.
allowed_scopesarray<string>AllowedScopes 는 이 client 가 요청 가능한 scope 목록.
namestringName 은 사용자에게 표시될 client 이름 (consent 화면 등).
redirect_urisarray<string>RedirectURIs 는 허용된 redirect URI 화이트리스트. authorize 시 이 목록과 정확히 일치해야 함.
token_endpoint_auth_methodstringAuthMethod 는 /oauth/token client 인증 방식. client_secret_basic / client_secret_post / none (public).
typestringType 은 client 종류. confidential (server-side) / public (browser, mobile, CLI).

응답 — 201 · 등록된 client + client_secret (최초 한 번)

이름타입설명
allowedGrantTypes (wire: allowed_grant_types)array<string>AllowedGrantTypes 는 허용된 grant_type.
allowedResources (wire: allowed_resources)array<string>AllowedResources 는 허용된 RFC 8707 resource audience 목록.
allowedScopes (wire: allowed_scopes)array<string>AllowedScopes 는 허용된 scope 목록.
appId (wire: app_id)stringAppID 는 client 가 속한 앱 UUID.
clientSecret (wire: client_secret)stringClientSecret 는 발급된 raw secret — confidential client 의 최초 응답에만 포함. 이후 조회에는 노출 X.
idstringID 는 client UUID.
namestringName 은 client 표시 이름.
redirectUris (wire: redirect_uris)array<string>RedirectURIs 는 허용된 redirect URI 화이트리스트.
tokenEndpointAuthMethod (wire: token_endpoint_auth_method)stringTokenEndpointAuthMethod 는 /oauth/token 인증 방식.
typestringType 은 client 종류.

에러 status: 400 401 403 404 500에러 처리

GET /api/v1/me

authGetApiV1Me

현재 access JWT 의 사용자 정보 + 활성 테넌트 멤버십 목록. CLI 가 device flow 후 처음 호출하고 SPA 가 부팅 시 호출.

  • 호출 권한: 인증된 사용자 (RequireAuth). user_id 는 JWT 에서 추출 — body 신뢰 X.
  • 사용자 row 가 없으면 (지웠는데 토큰은 남은 케이스) 404.
  • 부수 효과 없음 (read-only).
언어호출
nodesdk.identity.me(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthGetApiV1Me(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authGetApiV1Me(pathParams, query, body) — 비동기: authGetApiV1MeAsync(…) → CompletableFuture
kotlinclient.identity.authGetApiV1Me(pathParams, query, body) — suspend
pythonclient.identity.auth_get_api_v1_me(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_get_api_v1_me(path_params: …, query: …, body: …)
공통request("authGetApiV1Me", pathParams, query, body)

응답 — 200 · user + tenants

이름타입설명
invitationsarray<object>
tenantsarray<object>
userobject

에러 status: 401 404 500에러 처리

GET /api/v1/oauth-clients/{clientID}

authGetApiV1OauthClientsByClientID

client 한 건 조회. client_secret 은 응답에 포함되지 않음 (생성 시 한 번만 노출).

  • 호출 권한: 해당 앱 소유자 또는 같은 테넌트의 active tenant_admin (usecase 안에서 gate — 아니면 403).
  • clientID 가 UUID 형식이 아니면 400. client 가 없으면 404.
  • 부수 효과 없음 (read-only).
언어호출
nodesdk.identity.systemOAuthClients(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthGetApiV1OauthClientsByClientID(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authGetApiV1OauthClientsByClientID(pathParams, query, body) — 비동기: authGetApiV1OauthClientsByClientIDAsync(…) → CompletableFuture
kotlinclient.identity.authGetApiV1OauthClientsByClientID(pathParams, query, body) — suspend
pythonclient.identity.auth_get_api_v1_oauth_clients_by_client_id(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_get_api_v1_oauth_clients_by_client_id(path_params: …, query: …, body: …)
공통request("authGetApiV1OauthClientsByClientID", pathParams, query, body)

Path 파라미터pathParams 로 전달

이름타입설명
clientID 필수stringOAuth client UUID

응답 — 200 · client

이름타입설명
allowedGrantTypes (wire: allowed_grant_types)array<string>AllowedGrantTypes 는 허용된 grant_type.
allowedResources (wire: allowed_resources)array<string>AllowedResources 는 허용된 RFC 8707 resource audience 목록.
allowedScopes (wire: allowed_scopes)array<string>AllowedScopes 는 허용된 scope 목록.
appId (wire: app_id)stringAppID 는 client 가 속한 앱 UUID.
idstringID 는 client UUID.
namestringName 은 client 표시 이름.
redirectUris (wire: redirect_uris)array<string>RedirectURIs 는 허용된 redirect URI 화이트리스트.
tokenEndpointAuthMethod (wire: token_endpoint_auth_method)stringTokenEndpointAuthMethod 는 /oauth/token 인증 방식.
typestringType 은 client 종류.

에러 status: 400 401 403 404 500에러 처리

DELETE /api/v1/oauth/clients/{clientID}/grants/me

authDeleteApiV1OauthClientsByClientIDGrantsMe

현재 사용자가 path client 에 부여한 consent + 활성 refresh token 을 회수한다 ("이 앱과의 연결 끊기" 버튼).

  • 호출 권한: 인증된 사용자 (RequireAuth via cookie session). user_id 는 JWT 에서 추출.
  • clientID 가 UUID 형식이 아니면 400.
  • Idempotent — grant 가 없거나 이미 회수된 상태에서도 204.
  • 부수 효과: 해당 (user, client) 의 consent row + 활성 refresh token 모두 revoked 로 마킹.
언어호출
nodesdk.identity.oauth.grants(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthDeleteApiV1OauthClientsByClientIDGrantsMe(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authDeleteApiV1OauthClientsByClientIDGrantsMe(pathParams, query, body) — 비동기: authDeleteApiV1OauthClientsByClientIDGrantsMeAsync(…) → CompletableFuture
kotlinclient.identity.authDeleteApiV1OauthClientsByClientIDGrantsMe(pathParams, query, body) — suspend
pythonclient.identity.auth_delete_api_v1_oauth_clients_by_client_id_grants_me(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_delete_api_v1_oauth_clients_by_client_id_grants_me(path_params: …, query: …, body: …)
공통request("authDeleteApiV1OauthClientsByClientIDGrantsMe", pathParams, query, body)

Path 파라미터pathParams 로 전달

이름타입설명
clientID 필수stringOAuth client UUID

응답 — 204 · 회수 완료 (no content)

본문 없음 → SDK 는 빈 map {} 반환

에러 status: 400 401 500에러 처리

POST /auth/logout

authPostAuthLogout

_hub_refresh 의 refresh token 을 회수하고 hub cookie 3종을 제거한다.

  • 호출 권한: public — refresh cookie 가 없어도 idempotent (cookie clear 만 수행).
  • refresh token 회수 실패 (이미 회수 등) 는 silent 처리. 응답은 언제나 204.
  • 부수 효과: refresh token 회수 (DB), _hub_access/_hub_refresh/_hub_hint cookie 제거.
언어호출
nodesdk.identity(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthPostAuthLogout(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authPostAuthLogout(pathParams, query, body) — 비동기: authPostAuthLogoutAsync(…) → CompletableFuture
kotlinclient.identity.authPostAuthLogout(pathParams, query, body) — suspend
pythonclient.identity.auth_post_auth_logout(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_post_auth_logout(path_params: …, query: …, body: …)
공통request("authPostAuthLogout", pathParams, query, body)

응답 — 204 · 로그아웃 성공 (cookie 제거됨)

본문 없음 → SDK 는 빈 map {} 반환

POST /auth/refresh

authPostAuthRefresh

_hub_refresh cookie 의 refresh token 을 회전시키고 새 access JWT 를 발급한다.

  • 호출 권한: _hub_refresh cookie (path=/auth/refresh) 가 있는 브라우저. cookie 가 없거나 만료/회수면 401.
  • 호출 시 refresh token 이 회전 (이전 token 은 invalidate). 토큰 도난 탐지 목적.
  • 401 응답 시 _hub_access + _hub_refresh cookie 가 함께 제거됨.
  • 부수 효과: 새 _hub_access / _hub_refresh cookie set. JSON body 에 새 access token 동봉.
언어호출
nodesdk.identity(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthPostAuthRefresh(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authPostAuthRefresh(pathParams, query, body) — 비동기: authPostAuthRefreshAsync(…) → CompletableFuture
kotlinclient.identity.authPostAuthRefresh(pathParams, query, body) — suspend
pythonclient.identity.auth_post_auth_refresh(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_post_auth_refresh(path_params: …, query: …, body: …)
공통request("authPostAuthRefresh", pathParams, query, body)

응답 — 200 · 새 access JWT body + Set-Cookie

이름타입설명
accessToken (wire: access_token)stringAccessToken 은 발급된 access JWT. SPA 가 body 로 받고 싶을 때 사용.
expiresIn (wire: expires_in)integerExpiresIn 은 access token 만료까지 초.
tokenType (wire: token_type)stringTokenType 은 항상 Bearer.

에러 status: 401에러 처리

GET /oauth/userinfo

authGetOauthUserinfo

Access token 의 사용자 claim 을 scope 별로 필터해서 반환.

  • 호출 권한: OAuth access token (Authorization: Bearer). /oauth/token 으로 발급된 토큰. AX Hub 의 BearerAuth (cookie-issued JWT) 와는 별 인증 — WWW-Authenticate 헤더로 RFC 6750 응답.
  • 토큰 누락 시 401 invalid_request. 검증 실패 (만료/회수/형식 오류) 시 401 invalid_token.
  • scope 에 따라 응답 claim 이 달라짐: openid (sub), profile (name 등), email (email).
  • 부수 효과 없음 (read-only).
언어호출
nodesdk.identity(…) — 리소스 모델 — 인자·반환 타입은 패키지의 TypeScript 정의 참조
goclient.Identity().AuthGetOauthUserinfo(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …})
javaclient.identity().authGetOauthUserinfo(pathParams, query, body) — 비동기: authGetOauthUserinfoAsync(…) → CompletableFuture
kotlinclient.identity.authGetOauthUserinfo(pathParams, query, body) — suspend
pythonclient.identity.auth_get_oauth_userinfo(path_params=…, query=…, body=…) — AsyncAxHubClient 는 동일명 await
rubyclient.identity.auth_get_oauth_userinfo(path_params: …, query: …, body: …)
공통request("authGetOauthUserinfo", pathParams, query, body)

응답 — 200 · OIDC claims (scope-filtered)

스키마 미정의 — camelize 된 map 그대로 반환

에러 status: 401 500에러 처리