Files
msa-django-auth/users/urls.py
icurfer 03f7ad94a9
All checks were successful
Build And Test / build-and-push (push) Successful in 2m1s
v0.0.29 | 사이트 설정(SiteSettings) 모델 및 API 추가
- Google 로그인 활성화 여부 관리 기능
- 관리자 전용 설정 수정 API
- 싱글톤 패턴으로 구현

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:39:23 +09:00

57 lines
3.5 KiB
Python

from django.urls import path
from .views import (
RegisterView, MeView, CustomTokenObtainPairView,
SSHKeyUploadView, SSHKeyInfoView, SSHKeyRetrieveView,
UserListView, UserUpdateView,
NHNCloudCredentialsView, NHNCloudPasswordView,
# NHN Cloud 멀티 프로젝트 지원
NHNCloudProjectListView, NHNCloudProjectDetailView,
NHNCloudProjectActivateView, NHNCloudProjectPasswordView,
# KVM 서버 관리
KVMServerListView, KVMServerDetailView,
KVMServerActivateView, KVMServerSSHKeyView, KVMServerSSHKeyUploadView,
# 소셜 로그인
GoogleLoginView, GoogleLinkWithPasswordView, GoogleLinkView, GoogleUnlinkView,
# 사이트 설정
SiteSettingsView,
)
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView, TokenVerifyView
from .views_jwks import jwks_view # django-jwks
urlpatterns = [
path('register/', RegisterView.as_view(), name='register'),
# path('login/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
path('login/', CustomTokenObtainPairView.as_view(), name='token_obtain_pair'),
path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
path('verify/', TokenVerifyView.as_view(), name='token_verify'),
path('me/', MeView.as_view(), name='me'),
path("ssh-key/", SSHKeyUploadView.as_view(), name="ssh_key_upload"),
path("ssh-key/info/", SSHKeyInfoView.as_view(), name="ssh_key_info"),
path("ssh-key/view/", SSHKeyRetrieveView.as_view(), name="ssh_key_retrieve"),
path(".well-known/jwks.json", jwks_view, name="jwks"), # django-jwks
# 관리자용 사용자 관리 API
path('users/', UserListView.as_view(), name='user_list'),
path('users/<int:pk>/', UserUpdateView.as_view(), name='user_update'),
# NHN Cloud 자격증명 API (기존 - 단일 프로젝트 호환)
path('nhn-cloud/', NHNCloudCredentialsView.as_view(), name='nhn_cloud_credentials'),
path('nhn-cloud/password/', NHNCloudPasswordView.as_view(), name='nhn_cloud_password'),
# NHN Cloud 프로젝트 API (멀티 프로젝트 지원)
path('nhn-cloud/projects/', NHNCloudProjectListView.as_view(), name='nhn_cloud_projects'),
path('nhn-cloud/projects/<int:project_id>/', NHNCloudProjectDetailView.as_view(), name='nhn_cloud_project_detail'),
path('nhn-cloud/projects/<int:project_id>/activate/', NHNCloudProjectActivateView.as_view(), name='nhn_cloud_project_activate'),
path('nhn-cloud/projects/<int:project_id>/password/', NHNCloudProjectPasswordView.as_view(), name='nhn_cloud_project_password'),
# KVM 서버 관리 API (멀티 서버 지원)
path('kvm-servers/', KVMServerListView.as_view(), name='kvm_server_list'),
path('kvm-servers/<int:server_id>/', KVMServerDetailView.as_view(), name='kvm_server_detail'),
path('kvm-servers/<int:server_id>/activate/', KVMServerActivateView.as_view(), name='kvm_server_activate'),
path('kvm-servers/<int:server_id>/ssh-key/', KVMServerSSHKeyView.as_view(), name='kvm_server_ssh_key'),
path('kvm-servers/<int:server_id>/ssh-key/upload/', KVMServerSSHKeyUploadView.as_view(), name='kvm_server_ssh_key_upload'),
# 소셜 로그인
path('auth/google/', GoogleLoginView.as_view(), name='google_login'),
path('auth/google/link-with-password/', GoogleLinkWithPasswordView.as_view(), name='google_link_with_password'),
path('auth/google/link/', GoogleLinkView.as_view(), name='google_link'),
path('auth/google/unlink/', GoogleUnlinkView.as_view(), name='google_unlink'),
# 사이트 설정
path('settings/', SiteSettingsView.as_view(), name='site_settings'),
]