Multi-tenant role authorization

This commit is contained in:
Shaun Walker
2019-08-25 14:52:25 -04:00
parent ad2d865d7c
commit f037898c6e
34 changed files with 312 additions and 252 deletions

View File

@ -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();

View File

@ -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)

View File

@ -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()