示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OpenIdProvider"/> class.
 /// </summary>
 /// <param name="applicationStore">The application store to use.  Cannot be null.</param>
 public OpenIdProvider(IOpenIdApplicationStore applicationStore)
     : this((INonceStore)applicationStore, (ICryptoKeyStore)applicationStore)
 {
     Requires.NotNull(applicationStore, "applicationStore");
     Contract.Ensures(this.SecuritySettings != null);
     Contract.Ensures(this.Channel != null);
 }
 protected virtual OpenIdRelyingParty CreateOpenIdRelyingParty(IOpenIdApplicationStore store)
 {
     // it matters
     return store != null
         ? new OpenIdRelyingParty(store)
         : new OpenIdRelyingParty();
 }
示例#3
0
 protected virtual OpenIdRelyingParty CreateOpenIdRelyingParty(IOpenIdApplicationStore store)
 {
     // it matters
     return(store != null
         ? new OpenIdRelyingParty(store)
         : new OpenIdRelyingParty());
 }
示例#4
0
        /// <summary>
        /// Creates the relying party instance used to generate authentication requests.
        /// </summary>
        /// <returns>The instantiated relying party.</returns>
        private OpenIdRelyingParty CreateRelyingParty()
        {
            // If we're in stateful mode, first use the explicitly given one on this control if there
            // is one.  Then try the configuration file specified one.  Finally, use the default
            // in-memory one that's built into OpenIdRelyingParty.
            IOpenIdApplicationStore store = this.Stateless ? null :
                                            (this.CustomApplicationStore ?? OpenIdElement.Configuration.RelyingParty.ApplicationStore.CreateInstance(OpenIdRelyingParty.HttpApplicationStore));
            var rp = new OpenIdRelyingParty(store);

            try {
                // Only set RequireSsl to true, as we don't want to override
                // a .config setting of true with false.
                if (this.RequireSsl)
                {
                    rp.SecuritySettings.RequireSsl = true;
                }
                return(rp);
            } catch {
                rp.Dispose();
                throw;
            }
        }
		/// <summary>
		/// Creates the relying party instance used to generate authentication requests.
		/// </summary>
		/// <param name="store">The store to pass to the relying party constructor.</param>
		/// <returns>The instantiated relying party.</returns>
		protected virtual OpenIdRelyingParty CreateRelyingParty(IOpenIdApplicationStore store) {
			return new OpenIdRelyingParty(store);
		}
示例#6
0
 public OpenIdApplicationManager(
     IOpenIdApplicationStore store,
     ILogger <OpenIdApplicationManager> logger)
     : base(store, logger)
 {
 }
 /// <summary>
 /// Creates the relying party instance used to generate authentication requests.
 /// </summary>
 /// <param name="store">The store to pass to the relying party constructor.</param>
 /// <returns>The instantiated relying party.</returns>
 protected override OpenIdRelyingParty CreateRelyingParty(IOpenIdApplicationStore store)
 {
     return(new OpenIdAjaxRelyingParty(store));
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="OpenIdAjaxRelyingParty"/> class.
		/// </summary>
		/// <param name="applicationStore">The application store.  If <c>null</c>, the relying party will always operate in "dumb mode".</param>
		public OpenIdAjaxRelyingParty(IOpenIdApplicationStore applicationStore)
			: base(applicationStore) {
			Reporting.RecordFeatureUse(this);
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="OpenIdProvider"/> class.
		/// </summary>
		/// <param name="applicationStore">The application store to use.  Cannot be null.</param>
		public OpenIdProvider(IOpenIdApplicationStore applicationStore)
			: this((INonceStore)applicationStore, (ICryptoKeyStore)applicationStore) {
			Contract.Requires<ArgumentNullException>(applicationStore != null);
			Contract.Ensures(this.SecuritySettings != null);
			Contract.Ensures(this.Channel != null);
		}
示例#10
0
		/// <summary>
		/// Initializes a new instance of the <see cref="OpenIdProvider"/> class.
		/// </summary>
		/// <param name="applicationStore">The application store to use.  Cannot be null.</param>
		public OpenIdProvider(IOpenIdApplicationStore applicationStore)
			: this((INonceStore)applicationStore, (ICryptoKeyStore)applicationStore) {
			Requires.NotNull(applicationStore, "applicationStore");
			Contract.Ensures(this.SecuritySettings != null);
			Contract.Ensures(this.Channel != null);
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="OpenIdProvider"/> class.
 /// </summary>
 /// <param name="applicationStore">The application store to use.  Cannot be null.</param>
 public OpenIdProvider(IOpenIdApplicationStore applicationStore)
     : this((INonceStore)applicationStore, (ICryptoKeyStore)applicationStore)
 {
     Requires.NotNull(applicationStore, "applicationStore");
 }
示例#12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OpenIdRelyingParty"/> class.
 /// </summary>
 /// <param name="applicationStore">The application store.  If <c>null</c>, the relying party will always operate in "stateless/dumb mode".</param>
 public OpenIdRelyingParty(IOpenIdApplicationStore applicationStore)
     : this(applicationStore, applicationStore)
 {
 }
示例#13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OpenIdAjaxRelyingParty"/> class.
 /// </summary>
 /// <param name="applicationStore">The application store.  If <c>null</c>, the relying party will always operate in "dumb mode".</param>
 public OpenIdAjaxRelyingParty(IOpenIdApplicationStore applicationStore)
     : base(applicationStore)
 {
     Reporting.RecordFeatureUse(this);
 }
示例#14
0
		/// <summary>
		/// Initializes a new instance of the <see cref="OpenIdProvider"/> class.
		/// </summary>
		/// <param name="applicationStore">The application store to use.  Cannot be null.</param>
		public OpenIdProvider(IOpenIdApplicationStore applicationStore)
			: this((INonceStore)applicationStore, (ICryptoKeyStore)applicationStore) {
			Requires.NotNull(applicationStore, "applicationStore");
		}
示例#15
0
		/// <summary>
		/// Initializes a new instance of the <see cref="OpenIdProvider" /> class.
		/// </summary>
		/// <param name="applicationStore">The application store to use.  Cannot be null.</param>
		/// <param name="hostFactories">The host factories.</param>
		public OpenIdProvider(IOpenIdApplicationStore applicationStore, IHostFactories hostFactories = null)
			: this((INonceStore)applicationStore, (ICryptoKeyStore)applicationStore, hostFactories) {
			Requires.NotNull(applicationStore, "applicationStore");
		}