This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IAuthenticationStep | |
{ | |
bool IsAuthentic(HttpRequest request); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoggingAuthenticationProcedure : IAuthenticationProcedure | |
{ | |
private readonly ILogger logger; | |
private readonly IAuthenticationProcedure innerProcedure; | |
public LoggingAuthenticationProcedure(ILogger logger, IAuthenticationProcedure procedure) | |
{ | |
this.logger = logger; | |
this.innerProcedure = procedure; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SignatureAuthenticationProcedure : IAuthenticationProcedure | |
{ | |
private readonly ILogger logger; | |
public SignatureAuthenticationProcedure(ILogger logger) | |
{ | |
this.logger = logger; | |
} | |
public AuthenticationResult Authenticate(HttpRequest request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Http.Features; | |
/// <summary> | |
/// Gets the raw target of an HTTP request. | |
/// </summary> | |
/// <returns>Raw target of an HTTP request</returns> | |
/// <remarks> | |
/// ASP.NET Core manipulates the HTTP request parameters exposed to pipeline | |
/// components via the HttpRequest class. This extension method delivers an untainted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyPageController : ContentController<MyContent> | |
{ | |
private readonly ICommentService commentService; | |
public MyPageController() | |
{ | |
commentService = EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance<ICommentService>(); | |
} | |
// ... |