internal TokenHandlingBindingElement(IServiceProviderTokenManager tokenManager, ServiceProviderSecuritySettings securitySettings) {
			Requires.NotNull(tokenManager, "tokenManager");
			Requires.NotNull(securitySettings, "securitySettings");

			this.tokenManager = tokenManager;
			this.securitySettings = securitySettings;
		}
		internal TokenHandlingBindingElement(IServiceProviderTokenManager tokenManager, ServiceProviderSecuritySettings securitySettings) {
			Contract.Requires<ArgumentNullException>(tokenManager != null);
			Contract.Requires<ArgumentNullException>(securitySettings != null);

			this.tokenManager = tokenManager;
			this.securitySettings = securitySettings;
		}
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
 /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
 /// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
 public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, OAuthServiceProviderMessageFactory messageTypeProvider)
     : this(serviceDescription, tokenManager, OAuthElement.Configuration.ServiceProvider.ApplicationStore.CreateInstance(HttpApplicationStore), messageTypeProvider)
 {
     Requires.NotNull(serviceDescription, "serviceDescription");
     Requires.NotNull(tokenManager, "tokenManager");
     Requires.NotNull(messageTypeProvider, "messageTypeProvider");
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
 /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
 /// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
 public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, OAuthServiceProviderMessageFactory messageTypeProvider)
     : this(serviceDescription, tokenManager, DotNetOpenAuthSection.Configuration.OAuth.ServiceProvider.ApplicationStore.CreateInstance(HttpApplicationStore), messageTypeProvider)
 {
     Contract.Requires <ArgumentNullException>(serviceDescription != null);
     Contract.Requires <ArgumentNullException>(tokenManager != null);
     Contract.Requires <ArgumentNullException>(messageTypeProvider != null);
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="RsaSha1SigningBindingElement"/> class
        /// for use by Service Providers.
        /// </summary>
        /// <param name="tokenManager">The token manager.</param>
        public RsaSha1SigningBindingElement(IServiceProviderTokenManager tokenManager)
            : base(HashAlgorithmName)
        {
            Contract.Requires <ArgumentNullException>(tokenManager != null);

            this.tokenManager = tokenManager;
        }
Esempio n. 6
0
		/// <summary>
		/// Initializes a new instance of the <see cref="OAuthChannel"/> class.
		/// </summary>
		/// <param name="signingBindingElement">The binding element to use for signing.</param>
		/// <param name="store">The web application store to use for nonces.</param>
		/// <param name="tokenManager">The token manager instance to use.</param>
		internal OAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, IServiceProviderTokenManager tokenManager)
			: this(
			signingBindingElement,
			store,
			tokenManager,
			new OAuthServiceProviderMessageFactory(tokenManager)) {
		}
        /// <summary>
        /// Initializes a new instance of the <see cref="RsaSha1SigningBindingElement"/> class
        /// for use by Service Providers.
        /// </summary>
        /// <param name="tokenManager">The token manager.</param>
        public RsaSha1SigningBindingElement(IServiceProviderTokenManager tokenManager)
            : base(HashAlgorithmName)
        {
            Contract.Requires(tokenManager != null);
            ErrorUtilities.VerifyArgumentNotNull(tokenManager, "tokenManager");

            this.tokenManager = tokenManager;
        }
        internal TokenHandlingBindingElement(IServiceProviderTokenManager tokenManager, ServiceProviderSecuritySettings securitySettings)
        {
            Requires.NotNull(tokenManager, "tokenManager");
            Requires.NotNull(securitySettings, "securitySettings");

            this.tokenManager     = tokenManager;
            this.securitySettings = securitySettings;
        }
		internal OAuthServiceProviderChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, IServiceProviderTokenManager tokenManager, ServiceProviderSecuritySettings securitySettings, IMessageFactory messageTypeProvider = null)
			: base(
			signingBindingElement,
			tokenManager,
			securitySettings,
			messageTypeProvider ?? new OAuthServiceProviderMessageFactory(tokenManager),
			InitializeBindingElements(signingBindingElement, store, tokenManager, securitySettings)) {
			Requires.NotNull(tokenManager, "tokenManager");
			Requires.NotNull(securitySettings, "securitySettings");
			Requires.NotNull(signingBindingElement, "signingBindingElement");
		}
Esempio n. 10
0
		internal OAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, IServiceProviderTokenManager tokenManager, ServiceProviderSecuritySettings securitySettings)
			: this(
			signingBindingElement,
			store,
			tokenManager,
			securitySettings,
			new OAuthServiceProviderMessageFactory(tokenManager)) {
			Contract.Requires<ArgumentNullException>(tokenManager != null);
			Contract.Requires<ArgumentNullException>(securitySettings != null);
			Contract.Requires<ArgumentNullException>(signingBindingElement != null);
			Contract.Requires<ArgumentException>(signingBindingElement.SignatureCallback == null, OAuthStrings.SigningElementAlreadyAssociatedWithChannel);
		}
Esempio n. 11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
        /// </summary>
        /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
        /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
        /// <param name="nonceStore">The nonce store.</param>
        /// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
        public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore, OAuthServiceProviderMessageFactory messageTypeProvider)
        {
            Contract.Requires <ArgumentNullException>(serviceDescription != null);
            Contract.Requires <ArgumentNullException>(tokenManager != null);
            Contract.Requires <ArgumentNullException>(nonceStore != null);
            Contract.Requires <ArgumentNullException>(messageTypeProvider != null);

            var signingElement = serviceDescription.CreateTamperProtectionElement();

            this.ServiceDescription = serviceDescription;
            this.OAuthChannel       = new OAuthChannel(signingElement, nonceStore, tokenManager, messageTypeProvider);
            this.TokenGenerator     = new StandardTokenGenerator();
            this.SecuritySettings   = DotNetOpenAuthSection.Configuration.OAuth.ServiceProvider.SecuritySettings.CreateSecuritySettings();

            Reporting.RecordFeatureAndDependencyUse(this, serviceDescription, tokenManager, nonceStore);
        }
Esempio n. 12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
        /// </summary>
        /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
        /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
        /// <param name="nonceStore">The nonce store.</param>
        /// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
        public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore, OAuthServiceProviderMessageFactory messageTypeProvider)
        {
            Requires.NotNull(serviceDescription, "serviceDescription");
            Requires.NotNull(tokenManager, "tokenManager");
            Requires.NotNull(nonceStore, "nonceStore");
            Requires.NotNull(messageTypeProvider, "messageTypeProvider");

            var signingElement = serviceDescription.CreateTamperProtectionElement();

            this.ServiceDescription = serviceDescription;
            this.SecuritySettings   = OAuthElement.Configuration.ServiceProvider.SecuritySettings.CreateSecuritySettings();
            this.OAuthChannel       = new OAuthServiceProviderChannel(signingElement, nonceStore, tokenManager, this.SecuritySettings, messageTypeProvider);
            this.TokenGenerator     = new StandardTokenGenerator();

            OAuthReporting.RecordFeatureAndDependencyUse(this, serviceDescription, tokenManager, nonceStore);
        }
Esempio n. 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomOAuthMessageFactory"/> class.
 /// </summary>
 /// <param name="tokenManager">The token manager instance to use.</param>
 public CustomOAuthMessageFactory(IServiceProviderTokenManager tokenManager)
     : base(tokenManager)
 {
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProviderOpenIdProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The service description.</param>
		/// <param name="tokenManager">The token manager.</param>
		/// <param name="nonceStore">The nonce store.</param>
		public ServiceProviderOpenIdProvider(ServiceProviderHostDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore)
			: base(serviceDescription, tokenManager, nonceStore) {
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProviderOpenIdProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The service description.</param>
		/// <param name="tokenManager">The token manager.</param>
		/// <param name="nonceStore">The nonce store.</param>
		/// <param name="messageTypeProvider">The message type provider.</param>
		public ServiceProviderOpenIdProvider(ServiceProviderHostDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore, OAuthServiceProviderMessageFactory messageTypeProvider)
			: base(serviceDescription, tokenManager, nonceStore, messageTypeProvider) {
		}
Esempio n. 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
 /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
 /// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
 public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, OAuthServiceProviderMessageFactory messageTypeProvider)
     : this(serviceDescription, tokenManager, new NonceMemoryStore(StandardExpirationBindingElement.DefaultMaximumMessageAge), messageTypeProvider)
 {
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProviderOpenIdProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The service description.</param>
		/// <param name="tokenManager">The token manager.</param>
		/// <param name="messageTypeProvider">The message type provider.</param>
		public ServiceProviderOpenIdProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, OAuthServiceProviderMessageFactory messageTypeProvider)
			: base(serviceDescription, tokenManager, messageTypeProvider) {
		}
Esempio n. 18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
        /// </summary>
        /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
        /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
        /// <param name="nonceStore">The nonce store.</param>
        /// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
        public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore, OAuthServiceProviderMessageFactory messageTypeProvider)
        {
            ErrorUtilities.VerifyArgumentNotNull(serviceDescription, "serviceDescription");
            ErrorUtilities.VerifyArgumentNotNull(tokenManager, "tokenManager");
            ErrorUtilities.VerifyArgumentNotNull(nonceStore, "nonceStore");
            ErrorUtilities.VerifyArgumentNotNull(messageTypeProvider, "messageTypeProvider");

            var signingElement = serviceDescription.CreateTamperProtectionElement();
            this.ServiceDescription = serviceDescription;
            this.OAuthChannel = new OAuthChannel(signingElement, nonceStore, tokenManager, messageTypeProvider);
            this.TokenGenerator = new StandardTokenGenerator();
            this.SecuritySettings = DotNetOpenAuthSection.Configuration.OAuth.ServiceProvider.SecuritySettings.CreateSecuritySettings();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CoordinatingOAuthServiceProviderChannel"/> class.
 /// </summary>
 /// <param name="signingBindingElement">The signing element for the Consumer to use.  Null for the Service Provider.</param>
 /// <param name="tokenManager">The token manager to use.</param>
 /// <param name="securitySettings">The security settings.</param>
 internal CoordinatingOAuthServiceProviderChannel(ITamperProtectionChannelBindingElement signingBindingElement, IServiceProviderTokenManager tokenManager, DotNetOpenAuth.OAuth.ServiceProviderSecuritySettings securitySettings)
     : base(
         signingBindingElement,
         new NonceMemoryStore(StandardExpirationBindingElement.MaximumMessageAge),
         tokenManager,
         securitySettings,
         new OAuthServiceProviderMessageFactory(tokenManager))
 {
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="OAuthServiceProviderMessageFactory"/> class.
		/// </summary>
		/// <param name="tokenManager">The token manager instance to use.</param>
		public OAuthServiceProviderMessageFactory(IServiceProviderTokenManager tokenManager) {
			Requires.NotNull(tokenManager, "tokenManager");

			this.tokenManager = tokenManager;
		}
Esempio n. 21
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
		/// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
		/// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
		public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, OAuthServiceProviderMessageFactory messageTypeProvider)
			: this(serviceDescription, tokenManager, OAuthElement.Configuration.ServiceProvider.ApplicationStore.CreateInstance(HttpApplicationStore), messageTypeProvider) {
			Requires.NotNull(serviceDescription, "serviceDescription");
			Requires.NotNull(tokenManager, "tokenManager");
			Requires.NotNull(messageTypeProvider, "messageTypeProvider");
		}
Esempio n. 22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
 /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
 public ServiceProvider(ServiceProviderHostDescription serviceDescription, IServiceProviderTokenManager tokenManager)
     : this(serviceDescription, tokenManager, new OAuthServiceProviderMessageFactory(tokenManager))
 {
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="TokenHandlingBindingElement"/> class.
		/// </summary>
		/// <param name="tokenManager">The token manager.</param>
		internal TokenHandlingBindingElement(IServiceProviderTokenManager tokenManager) {
			Contract.Requires<ArgumentNullException>(tokenManager != null);

			this.tokenManager = tokenManager;
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProviderOpenIdProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The service description.</param>
 /// <param name="tokenManager">The token manager.</param>
 /// <param name="nonceStore">The nonce store.</param>
 /// <param name="messageTypeProvider">The message type provider.</param>
 public ServiceProviderOpenIdProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore, OAuthServiceProviderMessageFactory messageTypeProvider)
     : base(serviceDescription, tokenManager, nonceStore, messageTypeProvider)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProviderOpenIdProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The service description.</param>
 /// <param name="tokenManager">The token manager.</param>
 /// <param name="nonceStore">The nonce store.</param>
 public ServiceProviderOpenIdProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore)
     : base(serviceDescription, tokenManager, nonceStore)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProviderOpenIdProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
 /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
 public ServiceProviderOpenIdProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager)
     : base(serviceDescription, tokenManager)
 {
 }
Esempio n. 27
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
		/// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
		public ServiceProvider(ServiceProviderHostDescription serviceDescription, IServiceProviderTokenManager tokenManager)
			: this(serviceDescription, tokenManager, new OAuthServiceProviderMessageFactory(tokenManager)) {
		}
Esempio n. 28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
 /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
 /// <param name="nonceStore">The nonce store.</param>
 public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore)
     : this(serviceDescription, tokenManager, nonceStore, new OAuthServiceProviderMessageFactory(tokenManager))
 {
 }
Esempio n. 29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CoordinatingOAuthChannel"/> class for Consumers.
 /// </summary>
 /// <param name="signingBindingElement">
 /// The signing element for the Consumer to use.  Null for the Service Provider.
 /// </param>
 /// <param name="tokenManager">The token manager to use.</param>
 internal CoordinatingOAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, IServiceProviderTokenManager tokenManager)
     : base(
         signingBindingElement,
         new NonceMemoryStore(StandardExpirationBindingElement.MaximumMessageAge),
         tokenManager)
 {
 }
Esempio n. 30
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TokenHandlingBindingElement"/> class.
        /// </summary>
        /// <param name="tokenManager">The token manager.</param>
        internal TokenHandlingBindingElement(IServiceProviderTokenManager tokenManager)
        {
            Contract.Requires <ArgumentNullException>(tokenManager != null);

            this.tokenManager = tokenManager;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="OAuthServiceProviderMessageFactory"/> class.
        /// </summary>
        /// <param name="tokenManager">The token manager instance to use.</param>
        public OAuthServiceProviderMessageFactory(IServiceProviderTokenManager tokenManager)
        {
            ErrorUtilities.VerifyArgumentNotNull(tokenManager, "tokenManager");

            this.tokenManager = tokenManager;
        }
		/// <summary>
		/// Initializes a new instance of the <see cref="OAuthServiceProviderMessageFactory"/> class.
		/// </summary>
		/// <param name="tokenManager">The token manager instance to use.</param>
		public OAuthServiceProviderMessageFactory(IServiceProviderTokenManager tokenManager) {
			Contract.Requires<ArgumentNullException>(tokenManager != null);

			this.tokenManager = tokenManager;
		}
Esempio n. 33
0
 internal OAuthServiceProviderChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, IServiceProviderTokenManager tokenManager, ServiceProviderSecuritySettings securitySettings, IMessageFactory messageTypeProvider = null, IHostFactories hostFactories = null)
     : base(
         signingBindingElement,
         tokenManager,
         securitySettings,
         messageTypeProvider ?? new OAuthServiceProviderMessageFactory(tokenManager),
         InitializeBindingElements(signingBindingElement, store, tokenManager, securitySettings),
         hostFactories)
 {
     Requires.NotNull(tokenManager, "tokenManager");
     Requires.NotNull(securitySettings, "securitySettings");
     Requires.NotNull(signingBindingElement, "signingBindingElement");
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProviderOpenIdProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
		/// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
		public ServiceProviderOpenIdProvider(ServiceProviderHostDescription serviceDescription, IServiceProviderTokenManager tokenManager)
			: base(serviceDescription, tokenManager) {
		}
Esempio n. 35
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
		/// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
		/// <param name="nonceStore">The nonce store.</param>
		/// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
		public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore, OAuthServiceProviderMessageFactory messageTypeProvider) {
			Requires.NotNull(serviceDescription, "serviceDescription");
			Requires.NotNull(tokenManager, "tokenManager");
			Requires.NotNull(nonceStore, "nonceStore");
			Requires.NotNull(messageTypeProvider, "messageTypeProvider");

			var signingElement = serviceDescription.CreateTamperProtectionElement();
			this.ServiceDescription = serviceDescription;
			this.SecuritySettings = OAuthElement.Configuration.ServiceProvider.SecuritySettings.CreateSecuritySettings();
			this.OAuthChannel = new OAuthServiceProviderChannel(signingElement, nonceStore, tokenManager, this.SecuritySettings, messageTypeProvider);
			this.TokenGenerator = new StandardTokenGenerator();

			OAuthReporting.RecordFeatureAndDependencyUse(this, serviceDescription, tokenManager, nonceStore);
		}
Esempio n. 36
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OAuthChannel"/> class.
 /// </summary>
 /// <param name="signingBindingElement">The binding element to use for signing.</param>
 /// <param name="store">The web application store to use for nonces.</param>
 /// <param name="tokenManager">The token manager instance to use.</param>
 internal OAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, IServiceProviderTokenManager tokenManager)
     : this(
         signingBindingElement,
         store,
         tokenManager,
         new OAuthServiceProviderMessageFactory(tokenManager))
 {
 }
Esempio n. 37
0
 public RsaSigningBindingElement(IServiceProviderTokenManager tokenManager)
     : base(tokenManager)
 {
     m_TokenManager = tokenManager;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProviderOpenIdProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The service description.</param>
 /// <param name="tokenManager">The token manager.</param>
 /// <param name="messageTypeProvider">The message type provider.</param>
 public ServiceProviderOpenIdProvider(ServiceProviderHostDescription serviceDescription, IServiceProviderTokenManager tokenManager, OAuthServiceProviderMessageFactory messageTypeProvider)
     : base(serviceDescription, tokenManager, messageTypeProvider)
 {
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="OAuthServiceProviderMessageFactory"/> class.
        /// </summary>
        /// <param name="tokenManager">The token manager instance to use.</param>
        public OAuthServiceProviderMessageFactory(IServiceProviderTokenManager tokenManager)
        {
            Requires.NotNull(tokenManager, "tokenManager");

            this.tokenManager = tokenManager;
        }
		/// <summary>
		/// Initializes a new instance of the <see cref="RsaSha1ServiceProviderSigningBindingElement"/> class.
		/// </summary>
		/// <param name="tokenManager">The token manager.</param>
		public RsaSha1ServiceProviderSigningBindingElement(IServiceProviderTokenManager tokenManager) {
			Requires.NotNull(tokenManager, "tokenManager");

			this.tokenManager = tokenManager;
		}
Esempio n. 41
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
		/// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
		/// <param name="nonceStore">The nonce store.</param>
		public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore)
			: this(serviceDescription, tokenManager, nonceStore, new OAuthServiceProviderMessageFactory(tokenManager)) {
		}
Esempio n. 42
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
		/// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
		/// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
		public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, OAuthServiceProviderMessageFactory messageTypeProvider)
			: this(serviceDescription, tokenManager, DotNetOpenAuthSection.Configuration.OAuth.ServiceProvider.ApplicationStore.CreateInstance(HttpApplicationStore), messageTypeProvider) {
			Contract.Requires<ArgumentNullException>(serviceDescription != null);
			Contract.Requires<ArgumentNullException>(tokenManager != null);
			Contract.Requires<ArgumentNullException>(messageTypeProvider != null);
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomOAuthMessageFactory"/> class.
 /// </summary>
 /// <param name="tokenManager">The token manager instance to use.</param>
 public CustomOAuthMessageFactory(IServiceProviderTokenManager tokenManager)
     : base(tokenManager)
 {
 }
Esempio n. 44
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ServiceProvider"/> class.
		/// </summary>
		/// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
		/// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
		/// <param name="nonceStore">The nonce store.</param>
		/// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
		public ServiceProvider(ServiceProviderDescription serviceDescription, IServiceProviderTokenManager tokenManager, INonceStore nonceStore, OAuthServiceProviderMessageFactory messageTypeProvider) {
			Contract.Requires<ArgumentNullException>(serviceDescription != null);
			Contract.Requires<ArgumentNullException>(tokenManager != null);
			Contract.Requires<ArgumentNullException>(nonceStore != null);
			Contract.Requires<ArgumentNullException>(messageTypeProvider != null);

			var signingElement = serviceDescription.CreateTamperProtectionElement();
			this.ServiceDescription = serviceDescription;
			this.OAuthChannel = new OAuthChannel(signingElement, nonceStore, tokenManager, messageTypeProvider);
			this.TokenGenerator = new StandardTokenGenerator();
			this.SecuritySettings = DotNetOpenAuthSection.Configuration.OAuth.ServiceProvider.SecuritySettings.CreateSecuritySettings();

			Reporting.RecordFeatureAndDependencyUse(this, serviceDescription, tokenManager, nonceStore);
		}
Esempio n. 45
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OAuthServiceProviderMessageFactory"/> class.
        /// </summary>
        /// <param name="tokenManager">The token manager instance to use.</param>
        public OAuthServiceProviderMessageFactory(IServiceProviderTokenManager tokenManager)
        {
            Contract.Requires <ArgumentNullException>(tokenManager != null);

            this.tokenManager = tokenManager;
        }
Esempio n. 46
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RsaSha1ServiceProviderSigningBindingElement"/> class.
        /// </summary>
        /// <param name="tokenManager">The token manager.</param>
        public RsaSha1ServiceProviderSigningBindingElement(IServiceProviderTokenManager tokenManager)
        {
            Requires.NotNull(tokenManager, "tokenManager");

            this.tokenManager = tokenManager;
        }