How can I override login Url?
Could you add it to AuthenticateAttribute as property?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When using ServiceStacks’ authentication mechanism you inherit from either
ServiceStackControllerorServiceStackController<T>which in turn inherits the former.The login URL is dictated by the
LoginRedirectUrlproperty ofServiceStackController.Since it is virtual you can simply override it in your own Controller. Or even better, make your own abstract base controller that inherits from
ServiceStackController. Then let all your controllers inherit that one. You now have a single point where you control things like the login URL.