Compare commits
4 Commits
05e3989ffb
...
1a7c2ff01f
Author | SHA1 | Date | |
---|---|---|---|
1a7c2ff01f | |||
1738878093 | |||
3ebb7137c0 | |||
65962c01c2 |
|
@ -20,6 +20,13 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Folder Include="Program\Controllers\V1\Interfaces\" />
|
||||
<Folder Include="publish\debug\" />
|
||||
<Folder Include="wwwroot\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_ContentIncludedByDefault Remove="wwwroot\css\app.css" />
|
||||
<_ContentIncludedByDefault Remove="wwwroot\css\tailwind.css" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
|
|
@ -118,16 +118,21 @@ builder.Services.AddHostedService<PushBackgroundService>();
|
|||
// PUSH 설정부 끝
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// 세션 설정
|
||||
// IN-MEMORY 캐시
|
||||
builder.Services.AddDistributedMemoryCache();
|
||||
builder.Services.AddSession();
|
||||
|
||||
// ==== SCOPED 으로 등록 할 서비스 ==== //
|
||||
// 여기다가 API 있는 컨트롤러들 AddScoped 하면 되는건가?
|
||||
builder.Services.AddScoped<JwtTokenService>();
|
||||
builder.Services.AddScoped<ILogRepository, LogRepository>();
|
||||
builder.Services.AddScoped<IRepositoryService, RepositoryService>();
|
||||
builder.Services.AddScoped<ISessionService, SessionService>();
|
||||
builder.Services.AddScoped<IHeaderConfig, HeaderConfigRepository>();
|
||||
|
||||
builder.Services.AddScoped<IUserService, UserService>();
|
||||
// builder.Services.AddScoped<IKakaoService, KakaoService>();
|
||||
builder.Services.AddScoped<IKakaoService, KakaoService>();
|
||||
builder.Services.AddScoped<IUserRepository, UserRepository>();
|
||||
|
||||
builder.Services.AddScoped<IAppService, AppService>();
|
||||
|
@ -215,6 +220,7 @@ app.UseStaticFiles(new StaticFileOptions
|
|||
});
|
||||
|
||||
app.UseRouting();
|
||||
app.UseSession();
|
||||
app.UseCors("CorsPolicy");
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
|
|
@ -25,6 +25,13 @@ namespace Back.Program.Common.Auth
|
|||
return;
|
||||
}
|
||||
|
||||
if (context.Request.Path.Value != null && context.Request.Path.Value.Contains("/out/"))
|
||||
{
|
||||
await _next(context);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 정적 파일 요청은 미들웨어 건너뜀
|
||||
var path = context.Request.Path.Value;
|
||||
if (path != null && (path.StartsWith("/api")))
|
||||
|
@ -58,12 +65,11 @@ namespace Back.Program.Common.Auth
|
|||
}
|
||||
|
||||
await _next(context);
|
||||
}
|
||||
|
||||
{
|
||||
await _next(context);
|
||||
return;
|
||||
}
|
||||
|
||||
await _next(context);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,18 +3,23 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
||||
namespace Back.Program.Common.Model
|
||||
{
|
||||
[Table("api_header")]
|
||||
public class APIHeader
|
||||
{
|
||||
[Key]
|
||||
public string specific_id { get; set; }
|
||||
[Table("api_header")]
|
||||
public class APIHeader
|
||||
{
|
||||
[Key]
|
||||
public string specific_id { get; set; }
|
||||
|
||||
public DateTime connect_date { get; set; }
|
||||
public string h_key { get; set; }
|
||||
public string h_value { get; set; }
|
||||
}
|
||||
public DateTime connect_date { get; set; }
|
||||
public string h_key { get; set; }
|
||||
public string h_value { get; set; }
|
||||
}
|
||||
|
||||
public class SessionData
|
||||
{
|
||||
public string key { get; set; }
|
||||
public string value { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
h_key : h_value
|
||||
iOS_AM_Connect_Key
|
||||
|
|
|
@ -25,8 +25,9 @@ namespace Back.Program.Controllers.V1
|
|||
private readonly JwtTokenService _jwtTokenService;
|
||||
private readonly IAppService _appService;
|
||||
private readonly IAppRepository _appRepository;
|
||||
private readonly ISessionService _sessionService;
|
||||
|
||||
public AppController(AppDbContext dbContext, ILogger<AppController> logger, IRepositoryService repositoryService, JwtTokenService jwtTokenService,IAppService appService, IAppRepository appRepository)
|
||||
public AppController(AppDbContext dbContext, ILogger<AppController> logger, IRepositoryService repositoryService, JwtTokenService jwtTokenService,IAppService appService, IAppRepository appRepository, ISessionService sessionService)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
_logger = logger;
|
||||
|
@ -34,6 +35,7 @@ namespace Back.Program.Controllers.V1
|
|||
_jwtTokenService = jwtTokenService;
|
||||
_appService = appService;
|
||||
_appRepository = appRepository;
|
||||
_sessionService = sessionService;
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,8 +73,50 @@ namespace Back.Program.Controllers.V1
|
|||
return Ok(result);
|
||||
}
|
||||
|
||||
[HttpGet("session/get")]
|
||||
[CustomOperation("세션 정보 읽어오기", "세션 정보를 읽어오는 동작 수행", "시스템")]
|
||||
public async Task<IActionResult> GetSessionData(string key)
|
||||
{
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
return BadRequest(APIResponse.InvalidInputError());
|
||||
}
|
||||
|
||||
var (success, value) = await _sessionService.GetString(key);
|
||||
if (!success)
|
||||
{
|
||||
return BadRequest(APIResponse.InvalidInputError());
|
||||
}
|
||||
|
||||
string summary = _repositoryService.ReadSummary(typeof(AppController), "GetSessionData");
|
||||
return Ok(APIResponse.Send("000", $"[{summary}], 정상", new { data = value }));
|
||||
}
|
||||
|
||||
[HttpPost("session/set")]
|
||||
[CustomOperation("세션 정보 저장하기", "세션 정보에 저장하는 동작 수행", "시스템")]
|
||||
public async Task<IActionResult> SetSessionData([FromBody] SessionData[] requests)
|
||||
{
|
||||
if(requests == null || requests.Length == 0)
|
||||
{
|
||||
return BadRequest(APIResponse.InvalidInputError());
|
||||
}
|
||||
|
||||
Console.WriteLine($"받은 세션 데이터: {JsonSerializer.Serialize(requests)}");
|
||||
|
||||
foreach(var request in requests)
|
||||
{
|
||||
Console.WriteLine($"세션 저장 시도 - key: {request.key}, value: {request.value}");
|
||||
var success = await _sessionService.SetString(request.key, request.value);
|
||||
if (!success)
|
||||
{
|
||||
Console.WriteLine($"세션 저장 실패 - key: {request.key}");
|
||||
return BadRequest(APIResponse.InvalidInputError());
|
||||
}
|
||||
Console.WriteLine($"세션 저장 성공 - key: {request.key}");
|
||||
}
|
||||
|
||||
return Ok(APIResponse.Send("000", $"[세션 저장]: 정상", new { }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
95
Program/Controllers/V1/OutController.cs
Normal file
95
Program/Controllers/V1/OutController.cs
Normal file
|
@ -0,0 +1,95 @@
|
|||
using System.Text.Json;
|
||||
using Microsoft.AspNetCore.Http.HttpResults;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Back.Program.Common.Model;
|
||||
using Back.Program.Controllers.V1;
|
||||
using Back.Program.Services.V1;
|
||||
using Back.Program.Services.V1.Interfaces;
|
||||
using Back.Program.Models.APIResponses;
|
||||
|
||||
namespace Back.Program.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("/api/v1/out/user")]
|
||||
[ApiExplorerSettings(GroupName = "외부 동작(사용자)")]
|
||||
public class OutController: ControllerBase
|
||||
{
|
||||
private readonly ILogger<OutController> _logger;
|
||||
private readonly IRepositoryService _repositoryService;
|
||||
private readonly IUserService _userService;
|
||||
private readonly IKakaoService _kakaoService;
|
||||
private readonly ISessionService _sessionService;
|
||||
|
||||
public OutController(ILogger<OutController> logger,
|
||||
IRepositoryService repositoryService, IUserService userService, IKakaoService kakaoService, ISessionService sessionService)
|
||||
{
|
||||
_logger = logger;
|
||||
_repositoryService = repositoryService;
|
||||
_userService = userService;
|
||||
_kakaoService = kakaoService;
|
||||
_sessionService = sessionService;
|
||||
}
|
||||
[HttpGet("kakao/auth")]
|
||||
[CustomOperation("카카오 로그인", "카카오 로그인 동작", "사용자")]
|
||||
public async Task<IActionResult> KakaoLogin([FromQuery] string? scope)
|
||||
{
|
||||
var url = await _kakaoService.GetAuthorizationUrl(scope ?? "");
|
||||
Console.WriteLine($"카카오 로그인 API: {url}");
|
||||
return Ok(new { url });
|
||||
}
|
||||
|
||||
[HttpGet("kakao/redirect")]
|
||||
public async Task<IActionResult> RedirectFromKakao([FromQuery] string code)
|
||||
{
|
||||
var (success, response) = await _kakaoService.Redirect(code);
|
||||
Console.WriteLine($"리다이렉트 : {response}");
|
||||
if (success)
|
||||
{
|
||||
// HttpContext.Session.SetString("AccessToken", response);
|
||||
var (idSuccess, idResponse) = await _kakaoService.UserMe(response);
|
||||
if (idSuccess)
|
||||
{
|
||||
var json = JsonDocument.Parse(idResponse);
|
||||
if (json.RootElement.TryGetProperty("id", out var idElement))
|
||||
{
|
||||
var snsId = idElement.ToString();
|
||||
Console.WriteLine($"ID = {snsId}");
|
||||
var loginResult = await _userService.Login("SNS Login", "ST01", snsId);
|
||||
Console.WriteLine($"login = {loginResult.JsonToString()}");
|
||||
if (loginResult.status.code == "000")
|
||||
{
|
||||
|
||||
var data = loginResult.data as LoginAPIResponse ?? new LoginAPIResponse();
|
||||
if (data != null)
|
||||
{
|
||||
string token = data.token;
|
||||
string refresh = data.refresh;
|
||||
if (await _sessionService.SetString("token", token) &&
|
||||
await _sessionService.SetString("refresh", refresh))
|
||||
{
|
||||
return Redirect("/about");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (loginResult.status.code == "001")
|
||||
{
|
||||
if (await _sessionService.SetString("snsId", snsId))
|
||||
{
|
||||
return Redirect("/auth/register");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return BadRequest(new { error = "로그인 실패", message = loginResult.status.message });
|
||||
}
|
||||
// return Ok(new { id="cc" });
|
||||
}
|
||||
}
|
||||
Console.WriteLine($"ID_res = {idResponse}");
|
||||
|
||||
}
|
||||
return BadRequest();
|
||||
|
||||
}
|
||||
}
|
|
@ -5,6 +5,7 @@ using Back.Program.Common.Model;
|
|||
using Back.Program.Models.Entities;
|
||||
using Back.Program.Services.V1.Interfaces;
|
||||
using Back.Program.Services.V1;
|
||||
using Microsoft.AspNetCore.Http.HttpResults;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
@ -21,7 +22,6 @@ namespace Back.Program.Controllers.V1
|
|||
private readonly ILogger<UserController> _logger;
|
||||
private readonly IRepositoryService _repositoryService;
|
||||
private readonly IUserService _userService;
|
||||
private readonly IKakaoService _kakaoService;
|
||||
|
||||
public UserController(ILogger<UserController> logger,
|
||||
IRepositoryService repositoryService, IUserService userService, IKakaoService kakaoService)
|
||||
|
@ -29,7 +29,6 @@ namespace Back.Program.Controllers.V1
|
|||
_logger = logger;
|
||||
_repositoryService = repositoryService;
|
||||
_userService = userService;
|
||||
_kakaoService = kakaoService;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
@ -108,13 +107,10 @@ namespace Back.Program.Controllers.V1
|
|||
}
|
||||
|
||||
|
||||
[HttpGet("kakao/auth")]
|
||||
[CustomOperation("카카오 로그인", "카카오 로그인 동작", "사용자")]
|
||||
public async Task<IActionResult> KakaoLogin([FromQuery] string scope)
|
||||
{
|
||||
var authUrl = await _kakaoService.GetAuthorizationUrl(scope);
|
||||
return Redirect(authUrl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,7 +118,7 @@ namespace Back.Program.Controllers.V1
|
|||
// 근데 회원 정보를 변경하는게 뭐뭐를 변경해야 하는지 아직 정해진게 없어서 이건 일단 보류
|
||||
/*
|
||||
[HttpGet("set")]
|
||||
[CustomOperation("회원 정보 변경", "회원 정보 변경", "사용자")]
|
||||
[CustomOperation("회원 정보 변경", "회원 정보 변경", "사혹자")]
|
||||
public async Task<IActionResult> SetUserData(string token, string refresh) //, [FromBody])
|
||||
{
|
||||
if (string.IsNullOrEmpty(token) || string.IsNullOrEmpty(refresh))
|
||||
|
|
7
Program/Models/APIResponses/API_User.cs
Normal file
7
Program/Models/APIResponses/API_User.cs
Normal file
|
@ -0,0 +1,7 @@
|
|||
namespace Back.Program.Models.APIResponses;
|
||||
|
||||
public class LoginAPIResponse
|
||||
{
|
||||
public string token { get; set; } = string.Empty;
|
||||
public string refresh { get; set; } = string.Empty;
|
||||
}
|
|
@ -9,4 +9,5 @@ public interface IKakaoService
|
|||
Task<(bool Success, string Response)> Redirect(string code);
|
||||
Task<(bool Success, string Response)> Logout(string accessToken);
|
||||
Task<(bool Success, string Response)> Unlink(string accessToken);
|
||||
Task<(bool Success, string Response)> UserMe(string accessToken);
|
||||
}
|
12
Program/Services/V1/Interfaces/IRepositoryService.cs
Normal file
12
Program/Services/V1/Interfaces/IRepositoryService.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
using System.Linq.Expressions;
|
||||
|
||||
namespace Back.Program.Services.V1.Interfaces;
|
||||
|
||||
public interface IRepositoryService
|
||||
{
|
||||
// Task<ValidateToken> ValidateToken(string token, string refresh);
|
||||
Task<bool> SaveData<T>(T entity, Expression<Func<T, object>> key = null) where T : class;
|
||||
Task<bool> DeleteData<T>(T entity, Expression<Func<T, object>> key = null) where T : class;
|
||||
String ReadSummary(Type type, String name);
|
||||
Task SendFrontData<T>(T data, string url);
|
||||
}
|
8
Program/Services/V1/Interfaces/ISessionService.cs
Normal file
8
Program/Services/V1/Interfaces/ISessionService.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Back.Program.Services.V1.Interfaces;
|
||||
|
||||
public interface ISessionService
|
||||
{
|
||||
Task<bool> SetString(string key, string value);
|
||||
Task<(bool result, string data)> GetString(string key);
|
||||
Task<bool> Remove(string key);
|
||||
}
|
|
@ -53,6 +53,11 @@ public class KakaoService: IKakaoService
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 인가 받은 코드로 토큰 받기를 실행하고 이 토큰으로 사용자 정보 가져오기를 할 수 있다.
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetAccessToken(string code)
|
||||
{
|
||||
var content = new FormUrlEncodedContent(new[]
|
||||
|
@ -81,6 +86,13 @@ public class KakaoService: IKakaoService
|
|||
return JsonSerializer.Serialize(new { access_token = accessToken.GetString() });
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 인가코드를 받는다 이 인가코드를 사용해 토큰 받기를 요청 할 수 있다.
|
||||
/// 이게 리다이렉트에 포함되어있음
|
||||
/// </summary>
|
||||
/// <param name="scope"></param>
|
||||
/// <returns></returns>
|
||||
public Task<string> GetAuthorizationUrl(string scope)
|
||||
{
|
||||
var authUrl = $"{KAKAO_AUTH_BASE_URL}/oauth/authorize?client_id={_clientId}&redirect_uri={_redirectUri}&response_type=code";
|
||||
|
@ -132,4 +144,14 @@ public class KakaoService: IKakaoService
|
|||
var response = await Call(HttpMethod.Post, $"{KAKAO_API_BASE_URL}/v1/user/unlink");
|
||||
return (true, response);
|
||||
}
|
||||
|
||||
public async Task<(bool Success, string Response)> UserMe(string accessToken)
|
||||
{
|
||||
if (string.IsNullOrEmpty(accessToken))
|
||||
return (false, JsonSerializer.Serialize(new { error = "Not logged in" }));
|
||||
|
||||
SetHeaders(accessToken);
|
||||
var response = await Call(HttpMethod.Get, $"{KAKAO_API_BASE_URL}/v2/user/me");
|
||||
return (true, response);
|
||||
}
|
||||
}
|
|
@ -1,21 +1,16 @@
|
|||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using Back.Program.Common.Auth;
|
||||
using Back.Program.Common.Data;
|
||||
using Back.Program.Common.Model;
|
||||
using Back.Program.Models.Entities;
|
||||
using Back.Program.Services.V1.Interfaces;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Back.Program.Services.V1
|
||||
{
|
||||
public interface IRepositoryService
|
||||
{
|
||||
// Task<ValidateToken> ValidateToken(string token, string refresh);
|
||||
Task<bool> SaveData<T>(T entity, Expression<Func<T, object>> key = null) where T : class;
|
||||
Task<bool> DeleteData<T>(T entity, Expression<Func<T, object>> key = null) where T : class;
|
||||
String ReadSummary(Type type, String name);
|
||||
}
|
||||
|
||||
public class RepositoryService: IRepositoryService
|
||||
{
|
||||
private readonly AppDbContext _dbContext;
|
||||
|
@ -29,61 +24,6 @@ namespace Back.Program.Services.V1
|
|||
_jwtTokenService = jwtTokenService;
|
||||
}
|
||||
|
||||
|
||||
// public async Task<ValidateToken> ValidateToken(string token, string refresh)
|
||||
// {
|
||||
// var principalToken = await _jwtTokenService.ValidateToken(token);
|
||||
// if (principalToken != null)
|
||||
// {
|
||||
// var uid = principalToken.FindFirst(ClaimTypes.NameIdentifier)?.Value ?? string.Empty;
|
||||
// _logger.LogInformation($"토큰 변환 - {uid}");
|
||||
// return new ValidateToken
|
||||
// {
|
||||
// token = token,
|
||||
// refresh = refresh,
|
||||
// uid = uid
|
||||
// };
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// _logger.LogInformation("엑세스 토큰 만료");
|
||||
// // var refreshToken = await _dbContext.RefreshTokens
|
||||
// // .FirstOrDefaultAsync(t => t.refresh_token == refresh);
|
||||
// // if (refreshToken == null)
|
||||
// // throw new TokenException("입력 받은 토큰 자체의 문제");
|
||||
// //
|
||||
// // var uid = refreshToken.uid;
|
||||
// //
|
||||
// // if (refreshToken.revoke_Date < DateTime.Now)
|
||||
// // throw new RefreshRevokeException("리프레시 토큰 해지");
|
||||
// //
|
||||
// // if (refreshToken.expire_date > DateTime.Now)
|
||||
// // {
|
||||
// // _logger.LogInformation($"인증 완료 리프레시 : {uid}");
|
||||
// // var access = _jwtTokenService.GenerateJwtToken(uid);
|
||||
// //
|
||||
// // return new ValidateToken
|
||||
// // {
|
||||
// // token = access,
|
||||
// // refresh = refreshToken.refresh_token,
|
||||
// // uid = uid
|
||||
// // };
|
||||
// // }
|
||||
// // else
|
||||
// // {
|
||||
// // refreshToken = _jwtTokenService.GenerateRefreshToken(uid);
|
||||
// // _logger.LogInformation("리프레시 토큰 만료");
|
||||
// // // await SaveData<RefreshToken, string>(refreshToken, rt => rt.uid);
|
||||
// // return new ValidateToken
|
||||
// // {
|
||||
// // token = token,
|
||||
// // refresh = refreshToken.refresh_token,
|
||||
// // uid = uid
|
||||
// // };
|
||||
// // }
|
||||
// }
|
||||
// }
|
||||
|
||||
public async Task<bool> SaveData<T>(T entity, Expression<Func<T, object>> key = null) where T : class
|
||||
{
|
||||
try
|
||||
|
@ -227,5 +167,14 @@ namespace Back.Program.Services.V1
|
|||
var att = method.GetCustomAttribute<CustomOperationAttribute>() ?? throw new AcaException(ResposeCode.NetworkErr,"swagger summary Load ERROR: NULL");
|
||||
return att.Summary;
|
||||
}
|
||||
|
||||
public async Task SendFrontData<T>(T data, string url)
|
||||
{
|
||||
using var httpClient = new HttpClient();
|
||||
var json = JsonSerializer.Serialize(data);
|
||||
var content = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
var response = await httpClient.PostAsync(url, content);
|
||||
response.EnsureSuccessStatusCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
50
Program/Services/V1/SessionService.cs
Normal file
50
Program/Services/V1/SessionService.cs
Normal file
|
@ -0,0 +1,50 @@
|
|||
using Back.Program.Services.V1.Interfaces;
|
||||
|
||||
namespace Back.Program.Services.V1;
|
||||
|
||||
public class SessionService: ISessionService
|
||||
{
|
||||
private readonly IHttpContextAccessor _http;
|
||||
public SessionService(IHttpContextAccessor http)
|
||||
{
|
||||
_http = http;
|
||||
}
|
||||
public Task<bool> SetString(string key, string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
_http.HttpContext.Session.SetString(key, value);
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return Task.FromResult(false);
|
||||
}
|
||||
}
|
||||
public Task<(bool result, string data)> GetString(string key)
|
||||
{
|
||||
try
|
||||
{
|
||||
var value = _http.HttpContext.Session.GetString(key);
|
||||
return Task.FromResult((true, value ?? string.Empty));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return Task.FromResult((false, ""));
|
||||
}
|
||||
}
|
||||
public Task<bool> Remove(string key)
|
||||
{
|
||||
try
|
||||
{
|
||||
_http.HttpContext.Session.Remove(key);
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return Task.FromResult(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -7,8 +7,15 @@
|
|||
},
|
||||
"PushFileSetting": {
|
||||
"uri": "https://api.sandbox.push.apple.com/",
|
||||
"p12Path": "/src/private/AM_Push_Sandbox.p12",
|
||||
"p12PWPath": "/src/private/appleKeys.json",
|
||||
"p12Path": "./private/AM_Push_Sandbox.p12",
|
||||
"p12PWPath": "./private/appleKeys.json",
|
||||
"apnsTopic": "me.myds.ipstein.acamate.AcaMate"
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"Kakao": {
|
||||
"ClientId": "a9632e6c14d8706ef6c8fe2ef52b721d",
|
||||
"ClientSecret": " this is rest api secret key ",
|
||||
"RedirectUri": "http://0.0.0.0:5144/api/v1/out/user/kakao/redirect"
|
||||
// "RedirectUri": "https://acamate.ipstein.com/kakao"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
"P12PWPath": "/src/private/appleKeys.json",
|
||||
"ApnsTopic": "me.myds.ipstein.acamate.AcaMate"
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
// "Kakao": {
|
||||
// "ClientId": "a9632e6c14d8706ef6c8fe2ef52b721d",
|
||||
// "ClientSecret": " this is rest api secret key ",
|
||||
// "RedirectUri": "https://acamate.ipstein.com/kakao"
|
||||
// }
|
||||
"AllowedHosts": "*",
|
||||
"Kakao": {
|
||||
"ClientId": "a9632e6c14d8706ef6c8fe2ef52b721d",
|
||||
"ClientSecret": " this is rest api secret key ",
|
||||
"RedirectUri": "https://acamate.ipstein.com/kakao"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user