/// <summary>
		/// Attaches an OAuth authorization request to an outgoing OpenID authentication request.
		/// </summary>
		/// <param name="openIdAuthenticationRequest">The OpenID authentication request.</param>
		/// <param name="scope">The scope of access that is requested of the service provider.</param>
		public void AttachAuthorizationRequest(IAuthenticationRequest openIdAuthenticationRequest, string scope) {
			Requires.NotNull(openIdAuthenticationRequest, "openIdAuthenticationRequest");

			var authorizationRequest = new AuthorizationRequest {
				Consumer = this.ConsumerKey,
				Scope = scope,
			};

			openIdAuthenticationRequest.AddExtension(authorizationRequest);
		}
Example #2
0
        /// <summary>
        /// Attaches an OAuth authorization request to an outgoing OpenID authentication request.
        /// </summary>
        /// <param name="openIdAuthenticationRequest">The OpenID authentication request.</param>
        /// <param name="scope">The scope of access that is requested of the service provider.</param>
        public void AttachAuthorizationRequest(IAuthenticationRequest openIdAuthenticationRequest, string scope)
        {
            Contract.Requires(openIdAuthenticationRequest != null);
            ErrorUtilities.VerifyArgumentNotNull(openIdAuthenticationRequest, "openIdAuthenticationRequest");

            var authorizationRequest = new AuthorizationRequest {
                Consumer = this.ConsumerKey,
                Scope = scope,
            };

            openIdAuthenticationRequest.AddExtension(authorizationRequest);
        }