forked from MDCPS/DamageAssessment_Backend
		
	Adding endpoint to autheticate from mobile
This commit is contained in:
		| @ -14,16 +14,17 @@ namespace DamageAssesment.Api.UsersAccess.Controllers | ||||
|         { | ||||
|             this.userAccessProvider = userAccessProvider; | ||||
|         } | ||||
|        // [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); | ||||
|        // } | ||||
|         [HttpPost("authenticate")] | ||||
|         public async Task<ActionResult> DadeSchoolAuthenticateAsync(UserCredentials userCredentials) | ||||
|         { | ||||
|             var result = await userAccessProvider.DadeSchoolAuthenticateAsync(userCredentials.username, userCredentials.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) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user