| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using CoreWCF.Channels; |
| | | 5 | | using CoreWCF.Dispatcher; |
| | | 6 | | |
| | | 7 | | namespace CoreWCF.Description; |
| | | 8 | | |
| | | 9 | | internal class EndpointAuthorizationBehavior : IEndpointBehavior |
| | | 10 | | { |
| | | 11 | | public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) |
| | | 12 | | { |
| | | 13 | | |
| | 673 | 14 | | } |
| | | 15 | | |
| | | 16 | | public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) |
| | | 17 | | { |
| | | 18 | | |
| | 0 | 19 | | } |
| | | 20 | | |
| | | 21 | | public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) |
| | | 22 | | { |
| | 641 | 23 | | BindingParameterCollection parameters = new() { endpoint.Binding }; |
| | 641 | 24 | | var authorizationCapabilities = endpoint.Binding.GetProperty<IAuthorizationCapabilities>(parameters); |
| | 641 | 25 | | if (authorizationCapabilities != null) |
| | | 26 | | { |
| | 427 | 27 | | endpointDispatcher.DispatchRuntime.RequireClaimsPrincipalOnOperationContext = |
| | 427 | 28 | | authorizationCapabilities.SupportsAuthorizationData; |
| | 427 | 29 | | endpointDispatcher.DispatchRuntime.SupportsAuthorizationData = |
| | 427 | 30 | | authorizationCapabilities.SupportsAuthorizationData; |
| | | 31 | | } |
| | 641 | 32 | | } |
| | | 33 | | |
| | | 34 | | public void Validate(ServiceEndpoint endpoint) |
| | | 35 | | { |
| | | 36 | | |
| | 641 | 37 | | } |
| | | 38 | | } |