Kakao.AspNetCore.SDK
0.0.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Kakao.AspNetCore.SDK --version 0.0.3
NuGet\Install-Package Kakao.AspNetCore.SDK -Version 0.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kakao.AspNetCore.SDK" Version="0.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Kakao.AspNetCore.SDK --version 0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Kakao.AspNetCore.SDK, 0.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Kakao.AspNetCore.SDK as a Cake Addin #addin nuget:?package=Kakao.AspNetCore.SDK&version=0.0.3 // Install Kakao.AspNetCore.SDK as a Cake Tool #tool nuget:?package=Kakao.AspNetCore.SDK&version=0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Kakao.AspNetCore.SDK
Example : https://github.com/kakao-tam/Kakao.AspNetCore.SDK
※ 베타 테스트 중으로 사용 방법은 변경될 수 있습니다.
※ KakaoSdk 라이브러리는 Kakao.AspNetCore.Authentication.OAuth2 라이브러리와 무관한 라이브러리입니다.
※ Redirect URI는 기본값 "/UserApi/KakaoLoginRedirectUri"이고, UseKakaoSDKInit의 파라메터로 재정의해서 커스터마이징 가능합니다.
※ 액세스 토큰은 HttpContext Session을 필수로 사용하며 Session에 kakao_access_token Key로 저장됩니다.
※ Session, kakao_access_token에 유효한 토큰을 설정하면 별도 인가요청 절차 없이 API를 사용할 수 있습니다.
ASP.NET Core 6.0 웹프로젝트 환경을 기준으로 제공되며, 라이브러리 내부적으로 세션과 API Controller를 포함하므로 Program.cs에 관련 설정이 있어야합니다.
사용 방법
설정
//Program.cs
builder.Services.UseKakaoSDKInit("앱키");
카카오 로그인
//Index.cshtml
<a href="/UserApi/loginWithKakaoAccount">
<img src="//k.kakaocdn.net/14/dn/btqCn0WEmI3/nijroPfbpCa4at5EIsjyf0/o.jpg" width="222" />
</a>
사용자 정보조회
//Index.cshtml
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>function REST_Call(path) {
$.ajax({
type: "GET",
url: path,
success: (data) => { console.log(data); $('#contents').html(data); }
});
}</script>
<p>
<button onclick="REST_Call('/UserApi/me')">프로필 조회 </button>
</p>
<p>
<textarea id="contents" rows='20' cols='100'></textarea>
</p>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
beta release 0.0.1, .net core 6.0, remove dependency