public IEstablishedClientChannelBuilder WithTransportAuthentication(DomainRole domainRole)
        {
            var authentication = new TransportAuthentication();

            authentication.DomainRole = domainRole;
            return(WithAuthentication(authentication));
        }
Exemple #2
0
        private static async Task AuthenticateAsTransportAsync(
            IServerChannel channel,
            TransportAuthentication transportAuthentication,
            Identity identity)
        {
            // Ensure that the domain role value is null.
            transportAuthentication.DomainRole = null;

            if (channel.Transport is IAuthenticatableTransport authenticatableTransport)
            {
                transportAuthentication.DomainRole = await authenticatableTransport.AuthenticateAsync(identity);
            }
        }