Reorganized config. Re implemented auth controller to use token-pair authentication and oauth2
This commit is contained in:
9
Moonlight.ApiServer/Interfaces/Auth/IAuthInterceptor.cs
Normal file
9
Moonlight.ApiServer/Interfaces/Auth/IAuthInterceptor.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Moonlight.ApiServer.Database.Entities;
|
||||
|
||||
namespace Moonlight.ApiServer.Interfaces.Auth;
|
||||
|
||||
public interface IAuthInterceptor
|
||||
{
|
||||
public bool AllowAccess(User user, IServiceProvider serviceProvider);
|
||||
public bool AllowRefresh(User user, IServiceProvider serviceProvider);
|
||||
}
|
||||
8
Moonlight.ApiServer/Interfaces/OAuth2/IOAuth2Provider.cs
Normal file
8
Moonlight.ApiServer/Interfaces/OAuth2/IOAuth2Provider.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Moonlight.ApiServer.Database.Entities;
|
||||
|
||||
namespace Moonlight.ApiServer.Interfaces.OAuth2;
|
||||
|
||||
public interface IOAuth2Provider
|
||||
{
|
||||
public Task<User?> Sync(IServiceProvider provider, string accessToken, string refreshToken);
|
||||
}
|
||||
Reference in New Issue
Block a user