diff options
Diffstat (limited to 'src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements')
3 files changed, 36 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/ExtensionsBindingElementRelyingParty.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/ExtensionsBindingElementRelyingParty.cs index bac06e5..20fc886 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/ExtensionsBindingElementRelyingParty.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/ExtensionsBindingElementRelyingParty.cs @@ -7,11 +7,15 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { using System; using System.Collections.Generic; + using System.Diagnostics.Contracts; using System.Linq; using System.Text; - using System.Diagnostics.Contracts; using DotNetOpenAuth.OpenId.RelyingParty; + /// <summary> + /// The OpenID binding element responsible for reading/writing OpenID extensions + /// at the Relying Party. + /// </summary> internal class ExtensionsBindingElementRelyingParty : ExtensionsBindingElement { /// <summary> /// The security settings that apply to this relying party, if it is a relying party. @@ -19,7 +23,7 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { private readonly RelyingPartySecuritySettings relyingPartySecuritySettings; /// <summary> - /// Initializes a new instance of the <see cref="ExtensionsBindingElement"/> class. + /// Initializes a new instance of the <see cref="ExtensionsBindingElementRelyingParty"/> class. /// </summary> /// <param name="extensionFactory">The extension factory.</param> /// <param name="securitySettings">The security settings.</param> diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyChannel.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyChannel.cs index 130c558..cfd2e8b 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyChannel.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyChannel.cs @@ -15,6 +15,9 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { using DotNetOpenAuth.OpenId.Extensions; using DotNetOpenAuth.OpenId.RelyingParty; + /// <summary> + /// The messaging channel for OpenID relying parties. + /// </summary> internal class OpenIdRelyingPartyChannel : OpenIdChannel { /// <summary> /// Initializes a new instance of the <see cref="OpenIdRelyingPartyChannel"/> class. diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/RelyingPartySigningBindingElement.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/RelyingPartySigningBindingElement.cs index 591c8f1..4a3f5ee 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/RelyingPartySigningBindingElement.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/RelyingPartySigningBindingElement.cs @@ -15,6 +15,9 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { using DotNetOpenAuth.OpenId.Messages; using DotNetOpenAuth.OpenId.RelyingParty; + /// <summary> + /// The signing binding element for OpenID Relying Parties. + /// </summary> internal class RelyingPartySigningBindingElement : SigningBindingElement { /// <summary> /// The association store used by Relying Parties to look up the secrets needed for signing. @@ -22,13 +25,20 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { private readonly IRelyingPartyAssociationStore rpAssociations; /// <summary> - /// Initializes a new instance of the SigningBindingElement class for use by a Relying Party. + /// Initializes a new instance of the <see cref="RelyingPartySigningBindingElement"/> class. /// </summary> /// <param name="associationStore">The association store used to look up the secrets needed for signing. May be null for dumb Relying Parties.</param> internal RelyingPartySigningBindingElement(IRelyingPartyAssociationStore associationStore) { this.rpAssociations = associationStore; } + /// <summary> + /// Gets a specific association referenced in a given message's association handle. + /// </summary> + /// <param name="signedMessage">The signed message whose association handle should be used to lookup the association to return.</param> + /// <returns> + /// The referenced association; or <c>null</c> if such an association cannot be found. + /// </returns> protected override Association GetSpecificAssociation(ITamperResistantOpenIdMessage signedMessage) { Association association = null; @@ -43,6 +53,13 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { return association; } + /// <summary> + /// Gets the association to use to sign or verify a message. + /// </summary> + /// <param name="signedMessage">The message to sign or verify.</param> + /// <returns> + /// The association to use to sign or verify the message. + /// </returns> protected override Association GetAssociation(ITamperResistantOpenIdMessage signedMessage) { // We're on a Relying Party verifying a signature. IDirectedProtocolMessage directedMessage = (IDirectedProtocolMessage)signedMessage; @@ -53,6 +70,15 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { } } + /// <summary> + /// Verifies the signature by unrecognized handle. + /// </summary> + /// <param name="message">The message.</param> + /// <param name="signedMessage">The signed message.</param> + /// <param name="protectionsApplied">The protections applied.</param> + /// <returns> + /// The applied protections. + /// </returns> protected override MessageProtections VerifySignatureByUnrecognizedHandle(IProtocolMessage message, ITamperResistantOpenIdMessage signedMessage, MessageProtections protectionsApplied) { // We did not recognize the association the provider used to sign the message. // Ask the provider to check the signature then. |