public UserCredentails(ProxyConfig config) { _config = config; _scopes = new[] { $"{_config.CrmHostUri}/user_impersonation" }; _authorityUrl = $"{_config.ContextAuthority}/{_config.TenantId}"; _clientApp = PublicClientApplicationBuilder.Create(_config.ClientId) .WithAuthority(_authorityUrl) .Build(); }
public ProxyMiddleware(RequestDelegate nextHandler, IOptions <ProxyConfig> options, ILoggerFactory loggerFactory, ICRMAuthenticator authenticator) { _nextHandler = nextHandler; _settings = options.Value; _logger = loggerFactory .CreateLogger <ProxyMiddleware>(); _authenticator = authenticator; }
private CRMProxyAuthenticator(ProxyConfig config, UserCredentails creds) { _creds = creds; _config = config; }