commented dadeschool authencation logic
This commit is contained in:
parent
cd982d160a
commit
bdde55b3e5
@ -14,17 +14,17 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
|
|||||||
{
|
{
|
||||||
this.userAccessProvider = userAccessProvider;
|
this.userAccessProvider = userAccessProvider;
|
||||||
}
|
}
|
||||||
[HttpPost("dadeschooltoken")]
|
// [HttpPost("dadeschooltoken")]
|
||||||
public async Task<ActionResult> DadeSchoolAuthenticateAsync(string username, string password)
|
// public async Task<ActionResult> DadeSchoolAuthenticateAsync(string username, string password)
|
||||||
{
|
{
|
||||||
var result = await userAccessProvider.DadeSchoolAuthenticateAsync(username, password);
|
// var result = await userAccessProvider.DadeSchoolAuthenticateAsync(username, password);
|
||||||
if (result.IsSuccess)
|
// if (result.IsSuccess)
|
||||||
{
|
// {
|
||||||
return Ok(result.TokenResponse);
|
// return Ok(result.TokenResponse);
|
||||||
}
|
// }
|
||||||
return Unauthorized(result.ErrorMessage);
|
// return Unauthorized(result.ErrorMessage);
|
||||||
}
|
// }
|
||||||
[Authorize(Policy = "Dadeschools")]
|
// [Authorize(Policy = "Dadeschools")]
|
||||||
[HttpPost("token/{employecode}")]
|
[HttpPost("token/{employecode}")]
|
||||||
public async Task<ActionResult> AuthenticateAsync(string employecode)
|
public async Task<ActionResult> AuthenticateAsync(string employecode)
|
||||||
{
|
{
|
||||||
@ -36,7 +36,7 @@ namespace DamageAssesment.Api.UsersAccess.Controllers
|
|||||||
return Unauthorized(result.ErrorMessage);
|
return Unauthorized(result.ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(Policy = "Dadeschools")]
|
// [Authorize(Policy = "Dadeschools")]
|
||||||
[HttpPost("refreshtoken")]
|
[HttpPost("refreshtoken")]
|
||||||
public async Task<ActionResult> RefreshTokenAsync(TokenResponse tokenResponse)
|
public async Task<ActionResult> RefreshTokenAsync(TokenResponse tokenResponse)
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,8 @@ $microservices = @(
|
|||||||
"DamageAssesment.Api.Locations",
|
"DamageAssesment.Api.Locations",
|
||||||
"DamageAssesment.Api.Questions",
|
"DamageAssesment.Api.Questions",
|
||||||
"DamageAssesment.Api.Responses",
|
"DamageAssesment.Api.Responses",
|
||||||
"DamageAssesment.Api.Surveys"
|
"DamageAssesment.Api.Surveys",
|
||||||
|
"DamageAssesment.Api.UsersAccess"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user