40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using BeWo.Data;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Configuration;
|
|
using System.Linq;
|
|
using System.ServiceModel;
|
|
using System.ServiceModel.Channels;
|
|
using System.ServiceModel.Description;
|
|
using System.ServiceModel.Dispatcher;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWo.Service.ServiceBehavior
|
|
{
|
|
public class AdminSecurityBehavior : IEndpointBehavior
|
|
{
|
|
public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
|
|
{
|
|
// Keine zusätzlichen Bindungsparameter erforderlich
|
|
}
|
|
|
|
public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
|
|
{
|
|
// Verhalten für Clients - hier nicht benötigt
|
|
}
|
|
|
|
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
|
|
{
|
|
// Füge einen Message Inspector hinzu, um eingehende Requests zu überprüfen
|
|
endpointDispatcher.DispatchRuntime.MessageInspectors.Add(new AdminServiceMessageInspector());
|
|
}
|
|
|
|
public void Validate(ServiceEndpoint endpoint)
|
|
{
|
|
// Optional: Endpunktvalidierung (falls erforderlich)
|
|
}
|
|
}
|
|
}
|