mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Fixed #2716
This commit is contained in:
parent
cb7c7992d9
commit
9106309be6
1 changed files with 1 additions and 6 deletions
|
@ -25,18 +25,16 @@ namespace Ombi.Controllers
|
||||||
[ApiController]
|
[ApiController]
|
||||||
public class TokenController : ControllerBase
|
public class TokenController : ControllerBase
|
||||||
{
|
{
|
||||||
public TokenController(OmbiUserManager um, IOptions<TokenAuthentication> ta, IAuditRepository audit, ITokenRepository token,
|
public TokenController(OmbiUserManager um, IOptions<TokenAuthentication> ta, ITokenRepository token,
|
||||||
IPlexOAuthManager oAuthManager)
|
IPlexOAuthManager oAuthManager)
|
||||||
{
|
{
|
||||||
_userManager = um;
|
_userManager = um;
|
||||||
_tokenAuthenticationOptions = ta.Value;
|
_tokenAuthenticationOptions = ta.Value;
|
||||||
_audit = audit;
|
|
||||||
_token = token;
|
_token = token;
|
||||||
_plexOAuthManager = oAuthManager;
|
_plexOAuthManager = oAuthManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly TokenAuthentication _tokenAuthenticationOptions;
|
private readonly TokenAuthentication _tokenAuthenticationOptions;
|
||||||
private readonly IAuditRepository _audit;
|
|
||||||
private readonly ITokenRepository _token;
|
private readonly ITokenRepository _token;
|
||||||
private readonly OmbiUserManager _userManager;
|
private readonly OmbiUserManager _userManager;
|
||||||
private readonly IPlexOAuthManager _plexOAuthManager;
|
private readonly IPlexOAuthManager _plexOAuthManager;
|
||||||
|
@ -52,9 +50,6 @@ namespace Ombi.Controllers
|
||||||
{
|
{
|
||||||
if (!model.UsePlexOAuth)
|
if (!model.UsePlexOAuth)
|
||||||
{
|
{
|
||||||
await _audit.Record(AuditType.None, AuditArea.Authentication,
|
|
||||||
$"UserName {model.Username} attempting to authenticate");
|
|
||||||
|
|
||||||
var user = await _userManager.FindByNameAsync(model.Username);
|
var user = await _userManager.FindByNameAsync(model.Username);
|
||||||
|
|
||||||
if (user == null)
|
if (user == null)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue