This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Application.Domain.Concrete; | |
using Application.Domain.Concrete.Directions; | |
using System; | |
using System.Linq; | |
using Xunit; | |
namespace Application.Tests.Domain | |
{ | |
public class NasaRoverTests | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region JwtTokenSection | |
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); | |
services.AddAuthentication() | |
.AddJwtBearer(cfg => | |
{ | |
cfg.RequireHttpsMetadata = false; | |
cfg.SaveToken = true; | |
cfg.TokenValidationParameters = new TokenValidationParameters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ConnectionStrings": { | |
//"DefaultConnection": "Server=LAPTOP-TB0R0HIF\\SQLEXPRESS;Database=ApplicationDB;Trusted_Connection=True;MultipleActiveResultSets=true" | |
"DefaultConnection": "Server=DESKTOP-K8FNOCF\\SQLEXPRESS;Database=ApplicationDB;Trusted_Connection=True;MultipleActiveResultSets=true" | |
}, | |
"Tokens": { | |
"Key": "43C8E1117FE618591B25199BDF6FBTT", | |
"Issuer": "http://localhost:61025/" | |
}, | |
"Logging": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Company.Application.Dto; | |
namespace Company.Application.WebApi.VM | |
{ | |
/// <summary> | |
/// Kullanıcıya geri döneceğimiz token bilgilerini taşıyacak | |
/// </summary> | |
public class TokenModel | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel.DataAnnotations; | |
namespace Company.Application.WebApi.VM | |
{ | |
/// <summary> | |
/// Login için kullanıcıdan istenen bilgileri taşır | |
/// </summary> | |
public class LoginModel | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Routing; | |
using System; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.AspNetCore.Authorization; | |
using Company.Application.Common.Api; | |
using System.Threading.Tasks; | |
using Company.Application.WebApi.VM; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Identity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Company.Application.Common.Api; | |
using Company.Application.WebApi.VM; | |
using Microsoft.AspNetCore.Mvc; | |
using System.Threading.Tasks; | |
namespace Company.Application.WebApi.Interfaces | |
{ | |
public interface ITokenController | |
{ | |
Task<ApiResult> LoginAsync([FromBody] LoginModel loginModel); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Company.Application.Common.Api; | |
using Company.Application.Common.Api.Base; | |
using Company.Application.Data.Entities; | |
using Company.Application.Dto; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Caching.Memory; | |
using System; | |
using Microsoft.Extensions.DependencyInjection; | |
using System.Collections.Generic; | |
using Microsoft.AspNetCore.Http; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AutoMapper; | |
using Company.Application.Common.Paging; | |
using Company.Application.Common.Paging.Interface; | |
using Company.Application.Common.UnitofWork; | |
using Company.Application.Data.Context; | |
using Company.Application.Data.Entities; | |
using Company.Application.WebApi.Controllers; | |
using Company.Application.WebApi.Interfaces; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; |
NewerOlder