Multi-tenant role authorization
This commit is contained in:
@ -18,7 +18,7 @@ namespace Oqtane.Services
|
||||
|
||||
Task DeleteUserAsync(int UserId);
|
||||
|
||||
Task<User> LoginUserAsync(User User);
|
||||
Task<User> LoginUserAsync(User User, bool SetCookie, bool IsPersistent);
|
||||
|
||||
Task LogoutUserAsync();
|
||||
|
||||
|
@ -8,7 +8,7 @@ namespace Oqtane.Services
|
||||
public class ServiceBase
|
||||
{
|
||||
|
||||
public string CreateApiUrl(Alias alias, string absoluteUri, string serviceName)
|
||||
public static string CreateApiUrl(Alias alias, string absoluteUri, string serviceName)
|
||||
{
|
||||
string apiurl = "";
|
||||
if (alias != null)
|
||||
|
@ -57,9 +57,9 @@ namespace Oqtane.Services
|
||||
await http.DeleteAsync(apiurl + "/" + UserId.ToString());
|
||||
}
|
||||
|
||||
public async Task<User> LoginUserAsync(User User)
|
||||
public async Task<User> LoginUserAsync(User User, bool SetCookie, bool IsPersistent)
|
||||
{
|
||||
return await http.PostJsonAsync<User>(apiurl + "/login", User);
|
||||
return await http.PostJsonAsync<User>(apiurl + "/login?setcookie=" + SetCookie.ToString() + "&persistent =" + IsPersistent.ToString(), User);
|
||||
}
|
||||
|
||||
public async Task LogoutUserAsync()
|
||||
|
Reference in New Issue
Block a user