示例#1
0
        public override void Setup()
        {
            base.Setup();

            this.adalServiceInfo = new AdalServiceInfo();
            this.adalServiceInfo.CopyFrom(this.serviceInfo);

            this.authenticationProvider = new AdalAuthenticationProvider(this.adalServiceInfo);
        }
示例#2
0
        public override void Setup()
        {
            base.Setup();

            this.adalServiceInfo = new AdalServiceInfo();
            this.adalServiceInfo.CopyFrom(this.serviceInfo);

            this.authenticationProvider = new TestAdalAuthenticationByCodeAuthenticationProvider(this.adalServiceInfo, authenticationCode);

            this.authenticationContextWrapper = new MockAuthenticationContextWrapper();
            this.authenticationProvider.authenticationContextWrapper = this.authenticationContextWrapper.Object;
        }
        public override void Setup()
        {
            base.Setup();

            this.adalServiceInfo = new AdalServiceInfo();
            this.adalServiceInfo.CopyFrom(this.serviceInfo);

            this.authenticationProvider = new TestAdalAppOnlyAuthenticationProvider(this.adalServiceInfo);

            this.authenticationContextWrapper = new MockAuthenticationContextWrapper();
            this.authenticationProvider.authenticationContextWrapper = this.authenticationContextWrapper.Object;

            this.clientCertificate = new X509Certificate2(@"Certs\testwebapplication.pfx", "password");
            this.adalServiceInfo.ClientCertificate = this.clientCertificate;
        }
示例#4
0
 /// <summary>
 /// Constructs an <see cref="TestAdalAppOnlyAuthenticationProvider"/>.
 /// </summary>
 /// <param name="serviceInfo">The information for authenticating against the service.</param>
 /// <param name="currentAccountSession">The current account session, used for initializing an already logged in application.</param>
 public TestAdalAppOnlyAuthenticationProvider(AdalServiceInfo serviceInfo)
     : base(serviceInfo)
 {
 }
 /// <summary>
 /// Constructs an <see cref="TestAdalAuthenticationByCodeAuthenticationProvider"/>.
 /// </summary>
 /// <param name="serviceInfo">The information for authenticating against the service.</param>
 /// <param name="authenticationCode">The code for retrieving the authentication token.</param>
 /// <param name="currentAccountSession">The current account session, used for initializing an already logged in application.</param>
 public TestAdalAuthenticationByCodeAuthenticationProvider(AdalServiceInfo serviceInfo, string authenticationCode)
     : base(serviceInfo, authenticationCode)
 {
 }