{"title":"Django에서의 사용자 증명","version":"3.1","locale":"ko","docname":"topics/auth/index","url":"/ko/3.1/topics/auth/","canonical":"https://djangodocs.dev/ko/3.1/topics/auth/","summary":"Django는 사용자 인증 시스템을 지원합니다. 이 시스템은 사용자 계정, 그룹, 권한과 쿠키 기반의 사용자 세션을 다룹니다. 문서의 이 섹션은 기본 구현이 어떻게 별도 설정 없이(out of the box) 작동하는지를 설명하고, 어떻게 프로젝트의 요구조건에 맞도록 Django 인증을…","html":"<h1>Django에서의 사용자 증명<a class=\"heading-anchor\" href=\"#user-authentication-in-django\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<div class=\"toctree-wrapper compound\">\n</div>\n<p id=\"module-django.contrib.auth\">Django는 사용자 인증 시스템을 지원합니다. 이 시스템은 사용자 계정, 그룹, 권한과 쿠키 기반의 사용자 세션을 다룹니다. 문서의 이 섹션은 기본 구현이 어떻게 별도 설정 없이(out of the box) 작동하는지를 설명하고, 어떻게 프로젝트의 요구조건에 맞도록 Django 인증을 <a class=\"reference internal\" href=\"/ko/3.1/topics/auth/customizing/\"><span class=\"doc\">확장하고 커스터마이징하는지</span></a> 또한 설명합니다.</p>\n<section id=\"overview\">\n<h2>개요<a class=\"heading-anchor\" href=\"#overview\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Django authentication 시스템은 인증과 권한부여를 모두 처리합니다. 요약하자면, 인증은 사용자가 누구인지를 판별하고, 권한부여는 인증된 사용자가 어떤 일을 할 수 있는지 결정합니다. 여기에 인증이라는 개념이 두 작업에 모두 쓰이게 됩니다.</p>\n<p>Auth 시스템은 다음과 같이 구성되어 있습니다:</p>\n<ul class=\"simple\">\n<li><p>사용자</p></li>\n<li><p>권한: 사용자가 특정 작업을 수행할 수 있는지 여부를 지정하는 이진 (yes/no) 플래그</p></li>\n<li><p>그룹: 라벨과 권한을 둘 이상의 사용자에게 적용하는 일반적인 방법</p></li>\n<li><p>A configurable password hashing system</p></li>\n<li><p>Forms and view tools for logging in users, or restricting content</p></li>\n<li><p>A pluggable backend system</p></li>\n</ul>\n<p>The authentication system in Django aims to be very generic and doesn’t provide\nsome features commonly found in web authentication systems. Solutions for some\nof these common problems have been implemented in third-party packages:</p>\n<ul class=\"simple\">\n<li><p>Password strength checking</p></li>\n<li><p>Throttling of login attempts</p></li>\n<li><p>Authentication against third-parties (OAuth, for example)</p></li>\n<li><p>Object-level permissions</p></li>\n</ul>\n</section>\n<section id=\"installation\">\n<h2>설치<a class=\"heading-anchor\" href=\"#installation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Authentication support is bundled as a Django contrib module in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.auth</span></code>. By default, the required configuration is already\nincluded in the <code class=\"file docutils literal notranslate\"><span class=\"pre\">settings.py</span></code> generated by <a class=\"reference internal\" href=\"/ko/3.1/ref/django-admin/#django-admin-startproject\"><code class=\"xref std std-djadmin docutils literal notranslate\"><span class=\"pre\">django-admin</span>\n<span class=\"pre\">startproject</span></code></a>, these consist of two items listed in your\n<a class=\"reference internal\" href=\"/ko/3.1/ref/settings/#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">INSTALLED_APPS</span></code></a> setting:</p>\n<ol class=\"arabic simple\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.auth'</span></code> contains the core of the authentication framework,\nand its default models.</p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">'django.contrib.contenttypes'</span></code> is the Django <a class=\"reference internal\" href=\"/ko/3.1/ref/contrib/contenttypes/\"><span class=\"doc\">content type system</span></a>, which allows permissions to be associated with\nmodels you create.</p></li>\n</ol>\n<p>and these items in your <a class=\"reference internal\" href=\"/ko/3.1/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">MIDDLEWARE</span></code></a> setting:</p>\n<ol class=\"arabic simple\">\n<li><p><a class=\"reference internal\" href=\"/ko/3.1/ref/middleware/#django.contrib.sessions.middleware.SessionMiddleware\" title=\"django.contrib.sessions.middleware.SessionMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">SessionMiddleware</span></code></a> manages\n<a class=\"reference internal\" href=\"/ko/3.1/topics/http/sessions/\"><span class=\"doc\">sessions</span></a> across requests.</p></li>\n<li><p><a class=\"reference internal\" href=\"/ko/3.1/ref/middleware/#django.contrib.auth.middleware.AuthenticationMiddleware\" title=\"django.contrib.auth.middleware.AuthenticationMiddleware\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">AuthenticationMiddleware</span></code></a> associates\nusers with requests using sessions.</p></li>\n</ol>\n<p>With these settings in place, running the command <code class=\"docutils literal notranslate\"><span class=\"pre\">manage.py</span> <span class=\"pre\">migrate</span></code> creates\nthe necessary database tables for auth related models and permissions for any\nmodels defined in your installed apps.</p>\n</section>\n<section id=\"usage\">\n<h2>Usage<a class=\"heading-anchor\" href=\"#usage\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p><a class=\"reference internal\" href=\"/ko/3.1/topics/auth/default/\"><span class=\"doc\">Using Django’s default implementation</span></a></p>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"/ko/3.1/topics/auth/default/#user-objects\"><span class=\"std std-ref\">Working with User objects</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"/ko/3.1/topics/auth/default/#topic-authorization\"><span class=\"std std-ref\">Permissions and authorization</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"/ko/3.1/topics/auth/default/#auth-web-requests\"><span class=\"std std-ref\">Authentication in web requests</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"/ko/3.1/topics/auth/default/#auth-admin\"><span class=\"std std-ref\">Managing users in the admin</span></a></p></li>\n</ul>\n<p><a class=\"reference internal\" href=\"/ko/3.1/ref/contrib/auth/\"><span class=\"doc\">API reference for the default implementation</span></a></p>\n<p><a class=\"reference internal\" href=\"/ko/3.1/topics/auth/customizing/\"><span class=\"doc\">Customizing Users and authentication</span></a></p>\n<p><a class=\"reference internal\" href=\"/ko/3.1/topics/auth/passwords/\"><span class=\"doc\">Password management in Django</span></a></p>\n</section>","rootId":"user-authentication-in-django","toc":[{"title":"개요","anchor":"overview","children":[]},{"title":"설치","anchor":"installation","children":[]},{"title":"Usage","anchor":"usage","children":[]}],"breadcrumbs":[{"docname":"topics/index","title":"Django 사용하기","url":"/ko/3.1/topics/"}],"prev":{"docname":"topics/testing/advanced","title":"Advanced testing topics","url":"/ko/3.1/topics/testing/advanced/"},"next":{"docname":"topics/auth/default","title":"Django 인증 시스템을 사용","url":"/ko/3.1/topics/auth/default/"},"formats":{"html":"/ko/3.1/topics/auth/","markdown":"/ko/3.1/topics/auth.md","json":"/ko/3.1/topics/auth.json"},"source":"https://github.com/django/django/blob/stable/3.1.x/docs/topics/auth/index.txt","official":"https://docs.djangoproject.com/ko/3.1/topics/auth/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11"],"inLocales":["en","zh-hans","fr","ja","id","pt-br","ko","es","el","pl"]}