ow
This commit is contained in:
1 parent
7eb017d8ee
commit
873f65dbbe
48 files changed
+1391
-1236
No files matched your search
@@ -12,6 +12,7 @@ using CloudBuilder.Security.Service;
|
||||
using CloudBuilder.Core.DependencyInjection.Request;
|
||||
using CloudBuilder.Security.Data;
|
||||
using CloudBuilder.Core.Authorization;
|
||||
using System;
|
||||
|
||||
namespace CloudBuilder.Web.Entry.Controllers.Security
|
||||
{
|
||||
@@ -174,6 +175,127 @@ this.authService= authService;
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "SecurityUser", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic ConfirmPassword(string password)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = authService.ConfirmPassword(password);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "SecurityUser", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic BeginBiometricRegistration(string deviceName)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = authService.BeginBiometricRegistration(deviceName);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "SecurityUser", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic FinishBiometricRegistration(FinishBiometricRegistrationData dto)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = authService.FinishBiometricRegistration(dto);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
public dynamic BeginBiometricLogin(string username)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = authService.BeginBiometricLogin(username);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
public dynamic FinishBiometricLogin(FinishBiometricLoginData dto)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = authService.FinishBiometricLogin(dto);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "SecurityUser", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic RemoveBiometric()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
authService.RemoveBiometric();
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user