AddAuthorization
![[ASP.NET Core] Claim 인증과 권한](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2Fbw9AMN%2FbtrkijNnVcC%2FAAAAAAAAAAAAAAAAAAAAAEzopP9YZHBnSI0_V7i4kc85Y0YP8QmIRl7u4WJhKbn9%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1753973999%26allow_ip%3D%26allow_referer%3D%26signature%3DWCSydnOLeXRwZZ576kZws59EmBM%253D)
[ASP.NET Core] Claim 인증과 권한
Claim은 특정한 key값을 통해 사용자 인증 및 권한을 관리하며 여기에 필요한 data를 추가하여 사용할 수 있는 인증방법입니다. 1. 기본설정 Startup.cs의 ConfigureServices() method에 인증 및 권한에 관련한 service를 추가합니다. services.AddAuthentication(defaultScheme: CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(option => { option.AccessDeniedPath = "/Home/Error"; option.LoginPath = "/login"; }); services.AddAuthorization(); services.AddHttpContextAcces..