-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
ServiceStack 4 Cookbook
By :
If you're creating a new system and you want your users to move to the new system, it might make sense to want to move their authenticate information to your new system so that in the future, you don't have to maintain both systems. Ideally, we can make this as seamless as possible for end users. In this recipe, we will look at overriding CredentialAuthProvider to give it custom behavior, which in this case is to check whether the credentials are valid for a legacy system and migrate the user to the new one.
In this example, we are going to extend ServiceStack's TextFileSettings class to mock our external authentication system. This new class is just illustrating the custom behavior inside the TryAuthenticate method, which will be our new custom credential-based authentication provider, as follows:
public class UserMigrationStorage : TextFileSettings
{
public UserMigrationStorage...
Change the font size
Change margin width
Change background colour