summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderBehavior.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderBehavior.cs')
-rw-r--r--src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderBehavior.cs114
1 files changed, 0 insertions, 114 deletions
diff --git a/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderBehavior.cs b/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderBehavior.cs
deleted file mode 100644
index 01b4ac8..0000000
--- a/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderBehavior.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-//-----------------------------------------------------------------------
-// <copyright file="IProviderBehavior.cs" company="Andrew Arnott">
-// Copyright (c) Andrew Arnott. All rights reserved.
-// </copyright>
-//-----------------------------------------------------------------------
-
-namespace DotNetOpenAuth.OpenId.Provider {
- using System;
- using System.Diagnostics.Contracts;
- using DotNetOpenAuth.OpenId.ChannelElements;
-
- /// <summary>
- /// Applies a custom security policy to certain OpenID security settings and behaviors.
- /// </summary>
- [ContractClass(typeof(IProviderBehaviorContract))]
- public interface IProviderBehavior {
- /// <summary>
- /// Applies a well known set of security requirements to a default set of security settings.
- /// </summary>
- /// <param name="securitySettings">The security settings to enhance with the requirements of this profile.</param>
- /// <remarks>
- /// Care should be taken to never decrease security when applying a profile.
- /// Profiles should only enhance security requirements to avoid being
- /// incompatible with each other.
- /// </remarks>
- void ApplySecuritySettings(ProviderSecuritySettings securitySettings);
-
- /// <summary>
- /// Called when a request is received by the Provider.
- /// </summary>
- /// <param name="request">The incoming request.</param>
- /// <returns>
- /// <c>true</c> if this behavior owns this request and wants to stop other behaviors
- /// from handling it; <c>false</c> to allow other behaviors to process this request.
- /// </returns>
- /// <remarks>
- /// Implementations may set a new value to <see cref="IRequest.SecuritySettings"/> but
- /// should not change the properties on the instance of <see cref="ProviderSecuritySettings"/>
- /// itself as that instance may be shared across many requests.
- /// </remarks>
- bool OnIncomingRequest(IRequest request);
-
- /// <summary>
- /// Called when the Provider is preparing to send a response to an authentication request.
- /// </summary>
- /// <param name="request">The request that is configured to generate the outgoing response.</param>
- /// <returns>
- /// <c>true</c> if this behavior owns this request and wants to stop other behaviors
- /// from handling it; <c>false</c> to allow other behaviors to process this request.
- /// </returns>
- bool OnOutgoingResponse(IAuthenticationRequest request);
- }
-
- /// <summary>
- /// Code contract for the <see cref="IProviderBehavior"/> type.
- /// </summary>
- [ContractClassFor(typeof(IProviderBehavior))]
- internal abstract class IProviderBehaviorContract : IProviderBehavior {
- /// <summary>
- /// Initializes a new instance of the <see cref="IProviderBehaviorContract"/> class.
- /// </summary>
- protected IProviderBehaviorContract() {
- }
-
- #region IProviderBehavior Members
-
- /// <summary>
- /// Applies a well known set of security requirements to a default set of security settings.
- /// </summary>
- /// <param name="securitySettings">The security settings to enhance with the requirements of this profile.</param>
- /// <remarks>
- /// Care should be taken to never decrease security when applying a profile.
- /// Profiles should only enhance security requirements to avoid being
- /// incompatible with each other.
- /// </remarks>
- void IProviderBehavior.ApplySecuritySettings(ProviderSecuritySettings securitySettings) {
- Contract.Requires<ArgumentNullException>(securitySettings != null);
- throw new System.NotImplementedException();
- }
-
- /// <summary>
- /// Called when a request is received by the Provider.
- /// </summary>
- /// <param name="request">The incoming request.</param>
- /// <returns>
- /// <c>true</c> if this behavior owns this request and wants to stop other behaviors
- /// from handling it; <c>false</c> to allow other behaviors to process this request.
- /// </returns>
- /// <remarks>
- /// Implementations may set a new value to <see cref="IRequest.SecuritySettings"/> but
- /// should not change the properties on the instance of <see cref="ProviderSecuritySettings"/>
- /// itself as that instance may be shared across many requests.
- /// </remarks>
- bool IProviderBehavior.OnIncomingRequest(IRequest request) {
- Contract.Requires<ArgumentNullException>(request != null);
- throw new System.NotImplementedException();
- }
-
- /// <summary>
- /// Called when the Provider is preparing to send a response to an authentication request.
- /// </summary>
- /// <param name="request">The request that is configured to generate the outgoing response.</param>
- /// <returns>
- /// <c>true</c> if this behavior owns this request and wants to stop other behaviors
- /// from handling it; <c>false</c> to allow other behaviors to process this request.
- /// </returns>
- bool IProviderBehavior.OnOutgoingResponse(IAuthenticationRequest request) {
- Contract.Requires<ArgumentNullException>(request != null);
- throw new System.NotImplementedException();
- }
-
- #endregion
- }
-}