iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
We don't want to use the existing login or authentication mechanism based on the Business template for the Web API. We only want to use a simple validation for username and encrypted password. We understand that there is a need to pass IdentityUserLogin (e.g. public virtual User GetUserProfile(IdentityUserLogin identity)) on some methods for the IdentityController, which is part of the Microsoft.AspNet.Identity package. However, we don't need this and we want the IdentityController to make use of custom Account/User table from an existing database only. We can't create this from scratch, so we need to implement a solution where we can use the existing login credentials from an old design. We can modify a few methods that is being exposed on the IdentityController, but we can't do the same for those methods with parameters that contain models from Microsoft.AspNet.Identity package.
Thanks!
Hi Jimmy,
The usage in the client can be found in the AppFramework which source code is publicly available. You can look deeper into the User.Infrastructure\UserService.cs which show the current implementation that works out-of-the-box in Crosslight. Feel free to extend the class, override the members as necessary to suit your needs, and register it through the dependency container.
With regards to the documentation, the key concept and class members for user management can be found here, although the page doesn't provide a guided-walkthrough on extending the class. As you may have aware, our team has added numerous walkthrough-style guides over the past months which you can find in both our blog and Developer Center. We'll keep hearing feedback from our customers and write guides based on the highly requested/asked topics.
Back to the original topic, if your application only use the Login or Logout method of the service, it should be safeto simply remove the methods in the server-side, and leave the implementation in AppFramework as is (considering they're not used).
Please let us know if you have any specific questions regarding the extensibility.
Hope this helps,
The methods in IdentityController are basically needed if they are consumed in the client, which is the case if the business template is purely used. However, if you've modified the client to certain extent, and you can ensure thatthe server methods are no longer consumed in the client, then it's safe to remove the methods in IdentityController.
When using custom tables, you're free to modify the IdentityController to suit your business requirements. For instance, you can create your own instance of context associated to your database and perform user login checking with your own logic. The most important part is probably the BasicAuthHttpModule class which handles the actualprocess of dispatching and authenticating the client request (particularly to access controller methods with Authorize attribute). So, to answer your second question, there are no necessary methods to retain as long as they're notconsumed in the client.
Let me know if you have any other questions.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname