2using System.Threading.Tasks;
33 return Array.Empty<
string>();
44 return Task.FromResult<
IUser>(
new InternalUser());
46 return Task.FromResult<
IUser>(
null);
60 private static bool IsLocal(
string EndPoint)
62 if (EndPoint ==
"internal")
65 EndPoint = EndPoint.RemovePortNumber();
67 if (EndPoint ==
"127.0.0.1" || EndPoint ==
"[::1]" || EndPoint ==
"localhost")
73 internal class InternalUser :
IUser
75 public string PasswordHash =>
string.Empty;
76 public string PasswordHashType =>
string.Empty;
77 public string UserName =>
"Internal";
78 public string FederatedUserName => this.UserName;
79 public string FriendlyName => this.UserName;
81 public bool HasPrivilege(
string Privilege)
Base class for all HTTP authentication schemes, as defined in RFC-7235: https://datatracker....
Represents an HTTP request.
string RemoteEndPoint
Remote end-point.
string LocalEndPoint
Local end-point.
Access scheme used for internal transfer of files between client and server.
override string[] GetChallenges(HttpRequest Request)
Gets available challenges for the authenticating client to respond to.
static bool IsInternal(HttpRequest Request)
Checks if a request is an internal transfer request, meaning that both the local and remote end point...
InternalTransferAccess()
Access scheme used for internal transfer of files between client and server.
override Task< IUser > IsAuthenticated(HttpRequest Request)
Checks if the request is authorized.
override string DisplayName
Display name for authentication scheme.
Basic interface for a user.