Class ServerUrls
- Namespace
- Fdyay.IdentityServer.Hosting
- Assembly
- Fdyay.IdentityServer.AspNetCore.dll
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public sealed class ServerUrls : IServerUrls
- Inheritance
-
ServerUrls
- Implements
- Inherited Members
Constructors
ServerUrls(IHttpContextAccessor)
Creates the service over the request in flight.
public ServerUrls(IHttpContextAccessor httpContextAccessor)
Parameters
httpContextAccessorIHttpContextAccessorReaches the request the URLs are read from.
Properties
BasePath
The path this server is mounted under, or empty at the host root.
public string BasePath { get; }
Property Value
BaseUrl
Origin and base path, with no trailing slash.
public string BaseUrl { get; }
Property Value
CurrentUrl
The URL this request reached, without query or fragment.
public string CurrentUrl { get; }
Property Value
Origin
Scheme and host, with the host in the form it travels in.
public string Origin { get; }
Property Value
Methods
BaseUrlOf(HttpRequest)
Origin and base path for a request, with no trailing slash.
public static string BaseUrlOf(HttpRequest request)
Parameters
requestHttpRequest
Returns
OriginOf(HttpRequest)
Scheme and host for a request, in the form the client used to reach it.
public static string OriginOf(HttpRequest request)
Parameters
requestHttpRequest
Returns
Remarks
Static so callers that already hold an HttpContext — IssuerNameService takes one
explicitly, deliberately — reach the same construction without resolving a service to get at it.