Open Closed

How to change SecurityStamp response message? #9054

inventiskr created

I set "AllowOneConcurrentLoginPerUser" to true for not allow the duplicate login. So first token get failed checking after seconde login and client always receive 401 StatusCode, with message "Current user did not login to system". I want to modify 'UserFriendlyException' message like 'A duplicate login has been detected. Your connection to the server has been lost. Access time : 11AM / IP :'. How to change response message when duplicate login?

1 Answer(s)
  • 0
    maliming created
    Support Team


    You can consider storing the information in current request/httpcontext.items or somewhere in the ValidateSecurityStampAsync method. Then rewrite AbpExceptionFilter( to try to read the information you stored. And return it.