How To: Call an Informatie Vlaanderen SOAP Service in an OnBehalfOf scenario

In the OnBehalfOf scenario, we supply only information in the SAML token about the identity of the caller of the service.

To call a secured Informatie Vlaanderen SOAP service, we need to call the service using a SAML token issued by our STS. To receive a valid SAML token from the STS, we authenticate using an application certificate. In the OnBehalfOf scenario, we additionally pass in the credentials of the original caller (current user) as an OnBehalfOf token, in the request. The STS will issue a SAML token valid to call the service, containing only the claims and identity of the current user. This scenario is identical to identity impersonation.

Note Note

If the service also needs the claims of the application certificate in the SAML token, then you need to use the ActAs scenario. For more information see: How To: Call an Informatie Vlaanderen SOAP Service in an ActAs scenario

Calling a service using OnBehalfOf

  1. Configure your application to call the service

    For more information see: How To: Consume an Informatie Vlaanderen SOAP Service

  2. Use the CreateChannelOnBehalfOfCurrentUser method of FederatedChannelFactoryT to create a channel that supports OnBehalfOf.

    The following example shows how to create a factory and channel that supports the OnBehalfOf scenario.

    C#
    var factory = new FederatedChannelFactory<ServiceReference.IServiceChannel>("WS2007FederationHttpBinding_IService_Certificate");
    var channel = factory.CreateChannelOnBehalfOfCurrentUser();
    using (channel.CreateSafeDisposer())
    {
        ...
    }
See Also