How to Use Crosslight to Require User to Re-Login?

14 replies. Last post: October 8, 2015 7:24 AM by Arief Handany
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Jimmy TungolMember

Hi,

Is Crosslight Enterprise Framework supposedly designed to get the user to LoginView when this error "Authorization has been denied for this request." has been detected? We know for a fact that the user account is no longer valid to access resources from the server, because the username has been modified by another application with access to the same database.

There is this code (see below), this is supposed to verify if a user account is still valid when the app starts. But this always returns true. Looking at the source code, it does always return true... is there a reason for you guys to do that? We are referring to the BasicWebApiAuthenticator.cs from github.

var accountService = ServiceProvider.GetService<IAccountService>();

try
{
    await accountService.VerifyAsync();
}

Furthermore, is there a built-in function that requires a user to re-login when the error mentioned above has been detected or if the account is no longer valid? Or do we need to implement this for every viewmodel with the use of the code snippet above? Cause that would be a tedious task when it can be incorporated with the enterprise view models from the AppFramework.

Please advise. Thanks!

All times are GMT -5. The time now is 1:40 AM.
Previous Next