Show / Hide Table of Contents

    Class UserInformationTransmissionHttpHandler

    This http handler is used in service-to-service communications. It should only be used when communicating with services using Dangl.Identity. It will send the user id, username and email as Http headers. The client must have special permissions granted so that receivers will accept these values. See the README for details.

    Inheritance
    System.Object
    System.Net.Http.HttpMessageHandler
    System.Net.Http.DelegatingHandler
    UserInformationTransmissionHttpHandler
    Implements
    System.IDisposable
    Inherited Members
    System.Net.Http.DelegatingHandler.Dispose(System.Boolean)
    System.Net.Http.DelegatingHandler.InnerHandler
    System.Net.Http.HttpMessageHandler.Dispose()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Dangl.Identity.Client.Mvc.Services
    Assembly: Dangl.Identity.Client.Mvc.dll
    Syntax
    public class UserInformationTransmissionHttpHandler : DelegatingHandler, IDisposable

    Constructors

    | Improve this Doc View Source

    UserInformationTransmissionHttpHandler(IEnumerable<String>, IUserInfoService)

    This http handler is used in service-to-service communications. It should only be used when communicating with services using Dangl.Identity. It will send the user id, username and email as Http headers. The client must have special permissions granted so that receivers will accept these values. See the README for details.

    Declaration
    public UserInformationTransmissionHttpHandler(IEnumerable<string> baseUrls, IUserInfoService userInfoService)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.String> baseUrls
    IUserInfoService userInfoService
    | Improve this Doc View Source

    UserInformationTransmissionHttpHandler(IEnumerable<String>, IHttpContextAccessor)

    This constructor takes an Microsoft.AspNetCore.Http.IHttpContextAccessor to resolve the required IUserInfoService per-request. This should be used in combination with long-lifed objects, for example when using the HttpClientFactory where a single instance of the delegate is kept alive for multiple requests.

    Declaration
    public UserInformationTransmissionHttpHandler(IEnumerable<string> baseUrls, IHttpContextAccessor httpContextAccessor)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.String> baseUrls
    Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor

    Methods

    | Improve this Doc View Source

    SendAsync(HttpRequestMessage, CancellationToken)

    Will append the headers if the request url is absolute and is in the list of allowed base urls

    Declaration
    protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Net.Http.HttpRequestMessage request
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
    Overrides
    System.Net.Http.DelegatingHandler.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)

    Implements

    System.IDisposable

    Extension Methods

    ObjectExtensions.Clone<T>(T)
    • Improve this Doc
    • View Source
    Back to top © Dangl IT - Georg Dangl