/// <summary>
		/// Called to create the Association based on a request previously given by the Relying Party.
		/// </summary>
		/// <param name="request">The prior request for an association.</param>
		/// <param name="response">The response.</param>
		/// <param name="associationStore">The Provider's association store.</param>
		/// <param name="securitySettings">The security settings for the Provider.  Should be <c>null</c> for Relying Parties.</param>
		/// <returns>
		/// The created association.
		/// </returns>
		/// <remarks>
		/// The response message is updated to include the details of the created association by this method.
		/// This method is called by both the Provider and the Relying Party, but actually performs
		/// quite different operations in either scenario.
		/// </remarks>
		internal static Association CreateAssociation(AssociateRequest request, IAssociateSuccessfulResponseProvider response, IProviderAssociationStore associationStore, ProviderSecuritySettings securitySettings) {
			Requires.NotNull(request, "request");
			Requires.NotNull(response, "response");
			Requires.NotNull(securitySettings, "securitySettings");

			// We need to initialize some common properties based on the created association.
			var association = response.CreateAssociationAtProvider(request, associationStore, securitySettings);
			response.ExpiresIn = association.SecondsTillExpiration;
			response.AssociationHandle = association.Handle;

			return association;
		}
Esempio n. 2
0
        /// <summary>
        /// Called to create the Association based on a request previously given by the Relying Party.
        /// </summary>
        /// <param name="request">The prior request for an association.</param>
        /// <param name="response">The response.</param>
        /// <param name="associationStore">The Provider's association store.</param>
        /// <param name="securitySettings">The security settings for the Provider.  Should be <c>null</c> for Relying Parties.</param>
        /// <returns>
        /// The created association.
        /// </returns>
        /// <remarks>
        /// The response message is updated to include the details of the created association by this method.
        /// This method is called by both the Provider and the Relying Party, but actually performs
        /// quite different operations in either scenario.
        /// </remarks>
        internal static Association CreateAssociation(AssociateRequest request, IAssociateSuccessfulResponseProvider response, IProviderAssociationStore associationStore, ProviderSecuritySettings securitySettings)
        {
            Requires.NotNull(request, "request");
            Requires.NotNull(response, "response");
            Requires.NotNull(securitySettings, "securitySettings");

            // We need to initialize some common properties based on the created association.
            var association = response.CreateAssociationAtProvider(request, associationStore, securitySettings);

            response.ExpiresIn         = association.SecondsTillExpiration;
            response.AssociationHandle = association.Handle;

            return(association);
        }