When a user try to login to EPiServer I also wants to check the user credentials to an external Database, if external Database credentials does not match EPiServer I want to update the specific users credentials in External DB. If the users does not exists in the external db i want to return access denied or if the user are updated or exists i want to return the EPiServer Authenticated user. If I have AuthenticateType = "ExternalAuthDB" it should not be authenticated again.
I have tried to add another Authentication Provider to handle the authentication to the external database, and I failed to create a new UnifiedPrincipal that inehrits groups and personal information such as Name, email etc. that is added to Principal.
I have used this page to see how Authentication Chain works.
http://www.episerver.com/en/EPiServer_Knowledge_Center/FAQ_EPiServer_4/959/977/