Table of Contents

Interface IReturnUrlParser

Namespace
Fdyay.IdentityServer.Services
Assembly
Fdyay.IdentityServer.AspNetCore.dll

Recognises the return URLs of one protocol, and describes the request a return URL names.

public interface IReturnUrlParser

Remarks

The interactive pages are handed a return URL and send the browser back to it once the user has done what the protocol was waiting for. Two questions follow from that and both live here: whether the URL names a request this server issued and will resume — the guard between resuming a request and redirecting a freshly authenticated user wherever a link said — and what that request is, so a page can say which application is waiting.

One implementation per protocol, all of them registered. A server that speaks OpenID Connect and SAML has a login page shared between them, and before this the shared page recognised one of the two: the SAML endpoint redirected to it with a return URL nothing accepted, so a user who signed in was sent to the site root and the service provider was never answered.

Methods

IsValidReturnUrl(string?)

Whether this parser recognises the return URL as a request it can resume.

bool IsValidReturnUrl(string? returnUrl)

Parameters

returnUrl string

Returns

bool

ParseAsync(string?, CancellationToken)

The pending request the return URL names, or null when this parser does not own it.

Task<IAuthenticationContext?> ParseAsync(string? returnUrl, CancellationToken cancellationToken = default)

Parameters

returnUrl string
cancellationToken CancellationToken

Returns

Task<IAuthenticationContext>