From bdde55b3e51265449337fa54968a0cb813b7db90 Mon Sep 17 00:00:00 2001 From: Vijay Uppu <913468@dadeschools.net> Date: Tue, 21 Nov 2023 13:30:30 -0500 Subject: [PATCH] commented dadeschool authencation logic --- .../Controllers/UsersAccessController.cs | 22 +++++++++---------- db/migrate-sqldb_v1.ps1 | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/DamageAssesmentApi/DamageAssesment.Api.UsersAccess/Controllers/UsersAccessController.cs b/DamageAssesmentApi/DamageAssesment.Api.UsersAccess/Controllers/UsersAccessController.cs index 755b21e..336d9d9 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.UsersAccess/Controllers/UsersAccessController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.UsersAccess/Controllers/UsersAccessController.cs @@ -14,17 +14,17 @@ namespace DamageAssesment.Api.UsersAccess.Controllers { this.userAccessProvider = userAccessProvider; } - [HttpPost("dadeschooltoken")] - public async Task DadeSchoolAuthenticateAsync(string username, string password) + // [HttpPost("dadeschooltoken")] + // public async Task 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 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 RefreshTokenAsync(TokenResponse tokenResponse) { diff --git a/db/migrate-sqldb_v1.ps1 b/db/migrate-sqldb_v1.ps1 index 699f0e6..9701f9c 100644 --- a/db/migrate-sqldb_v1.ps1 +++ b/db/migrate-sqldb_v1.ps1 @@ -10,7 +10,8 @@ $microservices = @( "DamageAssesment.Api.Locations", "DamageAssesment.Api.Questions", "DamageAssesment.Api.Responses", - "DamageAssesment.Api.Surveys" + "DamageAssesment.Api.Surveys", + "DamageAssesment.Api.UsersAccess" )