public MsalConfidentialClient( CredentialPipeline pipeline, string tenantId, string clientId, ClientCertificateCredential.IX509Certificate2Provider certificateProvider, bool includeX5CClaimHeader, ITokenCacheOptions cacheOptions) : base(pipeline, tenantId, clientId, cacheOptions) { _includeX5CClaimHeader = includeX5CClaimHeader; _certificateProvider = certificateProvider; }
protected MsalClientBase(CredentialPipeline pipeline, string tenantId, string clientId, TokenCredentialOptions options) { // This validation is performed as a backstop. Validation in TokenCredentialOptions.AuthorityHost prevents users from explicitly // setting AuthorityHost to a non TLS endpoint. However, the AuthorityHost can also be set by the AZURE_AUTHORITY_HOST environment // variable rather than in code. In this case we need to validate the endpoint before we use it. However, we can't validate in // CredentialPipeline as this is also used by the ManagedIdentityCredential which allows non TLS endpoints. For this reason // we validate here as all other credentials will create an MSAL client. Validations.ValidateAuthorityHost(pipeline.AuthorityHost); ITokenCacheOptions cacheOptions = options as ITokenCacheOptions; IsPiiLoggingEnabled = options?.IsLoggingPIIEnabled ?? false; Pipeline = pipeline; TenantId = tenantId; ClientId = clientId; TokenCache = cacheOptions?.TokenCachePersistenceOptions == null ? null : new TokenCache(cacheOptions?.TokenCachePersistenceOptions); _clientAsyncLock = new AsyncLockWithValue <TClient>(); }
public MsalConfidentialClient(CredentialPipeline pipeline, string tenantId, string clientId, Func <string> assertionCallback, ITokenCacheOptions cacheOptions, RegionalAuthority?regionalAuthority, bool isPiiLoggingEnabled) : base(pipeline, tenantId, clientId, isPiiLoggingEnabled, cacheOptions) { _assertionCallback = assertionCallback; RegionalAuthority = regionalAuthority; }
public MsalConfidentialClient(CredentialPipeline pipeline, string tenantId, string clientId, IX509Certificate2Provider certificateProvider, bool includeX5CClaimHeader, ITokenCacheOptions cacheOptions, RegionalAuthority?regionalAuthority, bool isPiiLoggingEnabled) : base(pipeline, tenantId, clientId, isPiiLoggingEnabled, cacheOptions) { _includeX5CClaimHeader = includeX5CClaimHeader; _certificateProvider = certificateProvider; RegionalAuthority = regionalAuthority; }
public MsalConfidentialClient(CredentialPipeline pipeline, string tenantId, string clientId, string clientSecret, string redirectUrl, ITokenCacheOptions cacheOptions, RegionalAuthority?regionalAuthority, bool isPiiLoggingEnabled) : base(pipeline, tenantId, clientId, isPiiLoggingEnabled, cacheOptions) { _clientSecret = clientSecret; RedirectUrl = redirectUrl; RegionalAuthority = regionalAuthority; }
public MsalPublicClient(CredentialPipeline pipeline, string tenantId, string clientId, string redirectUrl, ITokenCacheOptions cacheOptions, bool isPiiLoggingEnabled, Action <PublicClientApplicationBuilder> beforeBuildClient = null) : base(pipeline, tenantId, clientId, isPiiLoggingEnabled, cacheOptions) { RedirectUrl = redirectUrl; _beforeBuildClient = beforeBuildClient; }
public MsalPublicClient CreateMsalPublicClient(string clientId, string tenantId = default, string redirectUrl = default, ITokenCacheOptions cacheOptions = default) { return(new MsalPublicClient(HttpPipeline, AuthorityHost, clientId, tenantId, redirectUrl, cacheOptions)); }
public MsalPublicClient(CredentialPipeline pipeline, string tenantId, string clientId, string redirectUrl, ITokenCacheOptions cacheOptions, bool isPiiLoggingEnabled) : base(pipeline, tenantId, clientId, isPiiLoggingEnabled, cacheOptions) { RedirectUrl = redirectUrl; }
public MsalConfidentialClient(CredentialPipeline pipeline, string tenantId, string clientId, string clientSecret, ITokenCacheOptions cacheOptions, RegionalAuthority?regionalAuthority, bool logPii) : base(pipeline, tenantId, clientId, cacheOptions) { _clientSecret = clientSecret; RegionalAuthority = regionalAuthority; LogPII = logPii; }
protected MsalClientBase(CredentialPipeline pipeline, string tenantId, string clientId, ITokenCacheOptions cacheOptions) { Pipeline = pipeline; TenantId = tenantId; ClientId = clientId; EnablePersistentCache = cacheOptions?.EnablePersistentCache ?? false; AllowUnencryptedCache = cacheOptions?.AllowUnencryptedCache ?? false; _clientAsyncLock = new AsyncLockWithValue <TClient>(); }
public MsalConfidentialClient(CredentialPipeline pipeline, string tenantId, string clientId, string clientSecret, ITokenCacheOptions cacheOptions) : base(pipeline, tenantId, clientId, cacheOptions) { _clientSecret = clientSecret; }
public MockMsalClient(CredentialPipeline pipeline, string tenantId, string clientId, bool isPiiLoggingEnabled, ITokenCacheOptions cacheOptions) : base(pipeline, tenantId, clientId, isPiiLoggingEnabled, cacheOptions) { }
public MsalPublicClient(HttpPipeline pipeline, Uri authorityHost, string clientId, string tenantId = default, string redirectUrl = default, ITokenCacheOptions cacheOptions = default) { tenantId ??= Constants.OrganizationsTenantId; var authorityUri = new UriBuilder(authorityHost.Scheme, authorityHost.Host, authorityHost.Port, tenantId).Uri; PublicClientApplicationBuilder pubAppBuilder = PublicClientApplicationBuilder.Create(clientId).WithAuthority(authorityUri).WithHttpClientFactory(new HttpPipelineClientFactory(pipeline)); pubAppBuilder = pubAppBuilder.WithTenantId(tenantId); if (!string.IsNullOrEmpty(redirectUrl)) { pubAppBuilder = pubAppBuilder.WithRedirectUri(redirectUrl); } _client = pubAppBuilder.Build(); _clientId = clientId; _ensureInitAsync = new Lazy <Task>(InitializeAsync); _attachSharedCache = cacheOptions?.EnablePersistentCache ?? false; }
public MsalConfidentialClient(CredentialPipeline pipeline, string tenantId, string clientId, string clientAssertion, ITokenCacheOptions cacheOptions) : base(pipeline, tenantId, clientId, cacheOptions) { this.clientAssertion = clientAssertion; }
protected MsalClientBase(CredentialPipeline pipeline, string tenantId, string clientId, ITokenCacheOptions cacheOptions) { Pipeline = pipeline; TenantId = tenantId; ClientId = clientId; EnablePersistentCache = cacheOptions?.EnablePersistentCache ?? false; AllowUnencryptedCache = cacheOptions?.AllowUnencryptedCache ?? false; _ensureInitAsync = new Lazy <Task>(InitializeAsync); }
public MsalPublicClient(CredentialPipeline pipeline, string tenantId, string clientId, string redirectUrl, ITokenCacheOptions cacheOptions) : base(pipeline, tenantId, clientId, cacheOptions) { RedirectUrl = redirectUrl; }
public MsalConfidentialClient(CredentialPipeline pipeline, string tenantId, string clientId, ClientCertificateCredential.IX509Certificate2Provider certificateProvider, bool includeX5CClaimHeader, ITokenCacheOptions cacheOptions, RegionalAuthority?regionalAuthority, bool logPii) : base(pipeline, tenantId, clientId, cacheOptions) { _includeX5CClaimHeader = includeX5CClaimHeader; _certificateProvider = certificateProvider; RegionalAuthority = regionalAuthority; LogPII = logPii; }