Table of Contents

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

httpContextAccessor IHttpContextAccessor

Reaches 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

string

BaseUrl

Origin and base path, with no trailing slash.

public string BaseUrl { get; }

Property Value

string

CurrentUrl

The URL this request reached, without query or fragment.

public string CurrentUrl { get; }

Property Value

string

Origin

Scheme and host, with the host in the form it travels in.

public string Origin { get; }

Property Value

string

Methods

BaseUrlOf(HttpRequest)

Origin and base path for a request, with no trailing slash.

public static string BaseUrlOf(HttpRequest request)

Parameters

request HttpRequest

Returns

string

OriginOf(HttpRequest)

Scheme and host for a request, in the form the client used to reach it.

public static string OriginOf(HttpRequest request)

Parameters

request HttpRequest

Returns

string

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.