/// <summary> /// Creates a relying party that does not verify incoming messages against /// nonce or association stores. /// </summary> /// <returns>The instantiated <see cref="OpenIdRelyingParty"/>.</returns> /// <remarks> /// Useful for previewing messages while /// allowing them to be fully processed and verified later. /// </remarks> internal static OpenIdRelyingParty CreateNonVerifying() { OpenIdRelyingParty rp = new OpenIdRelyingParty(); try { rp.Channel = OpenIdRelyingPartyChannel.CreateNonVerifyingChannel(); return(rp); } catch { rp.Dispose(); throw; } }
/// <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> /// <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; } }