/// <summary>
 /// The authorization and authentication controller.
 /// Check whether a certain user is registed in the database.
 /// If not the service provides the ressource in order to store the user in the database.
 /// Appropriate html status codes will be returned.
 /// </summary>
 /// <param name="loggerFactory">
 /// Logs all steps in case of an error.
 /// </param>
 /// <param name="registrationRepository">
 /// Repository pattern which handles all database call.
 /// </param>
 /// <param name="signInManager">
 /// Sign in manager stores and check the user credentials by means of the database.
 /// </param>
 public AuthController(ILogger <AuthController> loggerFactory,
                       IRegistrationsRepository registrationRepository,
                       SignInManager <DbUserIdentity> signInManager)
 {
     logger     = loggerFactory;
     repository = registrationRepository;
     signInMgt  = signInManager;
 }
 /// <summary>
 ///  Creates seeding information in the database, in case it had been empty before.
 /// </summary>
 /// <param name="registrationRepository">
 /// Constructor injection of the repository pattern, in order to manage a new seeding entry in the databse.
 /// </param>
 /// <param name="userMangerIdentity">
 /// Constructor injection of the user manager, in order to retrieve information from the database.
 /// </param>
 public DbSeeding(IRegistrationsRepository registrationRepository,
                  UserManager <DbUserIdentity> userMangerIdentity)
 {
     repository          = registrationRepository;
     userManagerIdentity = userMangerIdentity;
 }