/// <summary> /// Initialise a new instance of <see cref="OpenIdController"/> with the given input values. /// </summary> /// <param name="generalSettings">The application general settings.</param> /// <param name="certificateProvider">A service able to obtain a list of valid certificates that can be used to sign/validate a JWT.</param> public OpenIdController( IOptions <GeneralSettings> generalSettings, IJwtSigningCertificateProvider certificateProvider) { _generalSettings = generalSettings.Value; _certificateProvider = certificateProvider; }
/// <summary> /// Initialises a new instance of the <see cref="AuthenticationController"/> class with the given dependencies. /// </summary> /// <param name="logger">A generic logger</param> /// <param name="generalSettings">Configuration for the authentication scope.</param> /// <param name="cookieDecryptionService">A service that can decrypt a .ASPXAUTH cookie.</param> /// <param name="organisationRepository">the repository object that holds valid organisations</param> /// <param name="certificateProvider">Service that can obtain a list of certificates that can be used to generate JSON Web Tokens.</param> /// <param name="signingKeysRetriever">The class to use to obtain the signing keys.</param> public AuthenticationController( ILogger <AuthenticationController> logger, IOptions <GeneralSettings> generalSettings, ISigningKeysRetriever signingKeysRetriever, IJwtSigningCertificateProvider certificateProvider, ISblCookieDecryptionService cookieDecryptionService, IOrganisationRepository organisationRepository) { _logger = logger; _generalSettings = generalSettings.Value; _signingKeysRetriever = signingKeysRetriever; _certificateProvider = certificateProvider; _cookieDecryptionService = cookieDecryptionService; _organisationRepository = organisationRepository; }
/// <summary> /// Initialises a new instance of the <see cref="AuthenticationController"/> class with the given dependencies. /// </summary> /// <param name="logger">A generic logger</param> /// <param name="generalSettings">Configuration for the authentication scope.</param> /// <param name="cookieDecryptionService">A service that can decrypt a .ASPXAUTH cookie.</param> /// <param name="organisationRepository">the repository object that holds valid organisations</param> /// <param name="certificateProvider">Service that can obtain a list of certificates that can be used to generate JSON Web Tokens.</param> /// <param name="userProfileService">Service that can retrieve user profiles.</param> /// <param name="signingKeysRetriever">The class to use to obtain the signing keys.</param> public AuthenticationController( ILogger <AuthenticationController> logger, IOptions <GeneralSettings> generalSettings, ISigningKeysRetriever signingKeysRetriever, IJwtSigningCertificateProvider certificateProvider, ISblCookieDecryptionService cookieDecryptionService, IUserProfileService userProfileService, IOrganisationRepository organisationRepository) { _logger = logger; _generalSettings = generalSettings.Value; _signingKeysRetriever = signingKeysRetriever; _certificateProvider = certificateProvider; _cookieDecryptionService = cookieDecryptionService; _organisationRepository = organisationRepository; _userProfileService = userProfileService; _validator = new JwtSecurityTokenHandler(); }