public UsersController(IOptions <AadB2cApplicationOptions> aadB2cApplicationOptions) { this.aadB2cApplicationOptions = aadB2cApplicationOptions.Value; this.authenticationContext = new AuthenticationContext($"https://login.microsoftonline.com/{aadB2cApplicationOptions.Value.Tenant}"); this.clientCredential = new ClientCredential(aadB2cApplicationOptions.Value.ApplicationId, aadB2cApplicationOptions.Value.ApplicationKey); }
public ScoresController(IDataProtectionProvider dataProtectionProvider, IOptions <DocumentDbOptions> documentDbOptions, DocumentClient documentClient, ILogger <ScoresController> logger, IOptions <AadB2cApplicationOptions> aadB2cApplicationOptions) { this.aadB2cApplicationOptions = aadB2cApplicationOptions.Value; this.authenticationContext = new AuthenticationContext($"https://login.microsoftonline.com/{aadB2cApplicationOptions.Value.Tenant}"); this.clientCredential = new ClientCredential(aadB2cApplicationOptions.Value.ApplicationId, aadB2cApplicationOptions.Value.ApplicationKey); this.dataProtector = dataProtectionProvider.CreateProtector("schultztables"); this.documentDbOptions = documentDbOptions.Value; this.documentClient = documentClient; this.logger = logger; }