You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
using MediaBrowser.Controller.Net;
|
|
using ServiceStack;
|
|
using ServiceStack.Auth;
|
|
|
|
namespace MediaBrowser.Server.Implementations.HttpServer.Security
|
|
{
|
|
public class SessionAuthProvider : CredentialsAuthProvider
|
|
{
|
|
private readonly ISessionContext _sessionContext;
|
|
|
|
public SessionAuthProvider(ISessionContext sessionContext)
|
|
{
|
|
_sessionContext = sessionContext;
|
|
}
|
|
|
|
public override bool TryAuthenticate(IServiceBase authService, string userName, string password)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override bool IsAuthorized(IAuthSession session, IAuthTokens tokens, Authenticate request = null)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected override void SaveUserAuth(IServiceBase authService, IAuthSession session, IAuthRepository authRepo, IAuthTokens tokens)
|
|
{
|
|
}
|
|
|
|
public override object Authenticate(IServiceBase authService, IAuthSession session, Authenticate request)
|
|
{
|
|
return base.Authenticate(authService, session, request);
|
|
}
|
|
}
|
|
}
|