commented dadeschool authencation logic

This commit is contained in:
Vijay Uppu 2023-11-21 13:30:30 -05:00
parent cd982d160a
commit bdde55b3e5
2 changed files with 13 additions and 12 deletions

View File

@ -14,17 +14,17 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
{
this.userAccessProvider = userAccessProvider;
}
[HttpPost("dadeschooltoken")]
public async Task<ActionResult> DadeSchoolAuthenticateAsync(string username, string password)
// [HttpPost("dadeschooltoken")]
// public async Task<ActionResult> DadeSchoolAuthenticateAsync(string username, string password)
{
var result = await userAccessProvider.DadeSchoolAuthenticateAsync(username, password);
if (result.IsSuccess)
{
return Ok(result.TokenResponse);
}
return Unauthorized(result.ErrorMessage);
}
[Authorize(Policy = "Dadeschools")]
// var result = await userAccessProvider.DadeSchoolAuthenticateAsync(username, password);
// if (result.IsSuccess)
// {
// return Ok(result.TokenResponse);
// }
// return Unauthorized(result.ErrorMessage);
// }
// [Authorize(Policy = "Dadeschools")]
[HttpPost("token/{employecode}")]
public async Task<ActionResult> AuthenticateAsync(string employecode)
{
@ -36,7 +36,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
return Unauthorized(result.ErrorMessage);
}
[Authorize(Policy = "Dadeschools")]
// [Authorize(Policy = "Dadeschools")]
[HttpPost("refreshtoken")]
public async Task<ActionResult> RefreshTokenAsync(TokenResponse tokenResponse)
{

View File

@ -10,7 +10,8 @@ $microservices = @(
"DamageAssesment.Api.Locations",
"DamageAssesment.Api.Questions",
"DamageAssesment.Api.Responses",
"DamageAssesment.Api.Surveys"
"DamageAssesment.Api.Surveys",
"DamageAssesment.Api.UsersAccess"
)