C# Класс MyTested.AspNetCore.Mvc.HttpRequestBuilderAuthenticationExtensions

Contains authentication extension methods for IHttpRequestBuilder.
Показать файл Открыть проект

Открытые методы

Метод Описание
WithAuthenticatedUser ( this httpRequestBuilder ) : IAndHttpRequestBuilder

Sets default authenticated Microsoft.AspNetCore.Http.HttpContext.User to the built request with "TestId" identifier and "TestUser" username.

WithAuthenticatedUser ( this httpRequestBuilder, Action userBuilder ) : IAndHttpRequestBuilder

Sets custom authenticated Microsoft.AspNetCore.Http.HttpContext.User to the built request using the provided user builder.

Описание методов

WithAuthenticatedUser() публичный статический Метод

Sets default authenticated Microsoft.AspNetCore.Http.HttpContext.User to the built request with "TestId" identifier and "TestUser" username.
public static WithAuthenticatedUser ( this httpRequestBuilder ) : IAndHttpRequestBuilder
httpRequestBuilder this Instance of type.
Результат IAndHttpRequestBuilder

WithAuthenticatedUser() публичный статический Метод

Sets custom authenticated Microsoft.AspNetCore.Http.HttpContext.User to the built request using the provided user builder.
public static WithAuthenticatedUser ( this httpRequestBuilder, Action userBuilder ) : IAndHttpRequestBuilder
httpRequestBuilder this Instance of type.
userBuilder Action Action setting the by using .
Результат IAndHttpRequestBuilder