/// <summary> /// Validate whether the requested endpoint is the authentication endpoint. /// This supports all endopoints starting with AuthorizationEndpointPath (eg "/account/authorize" /// </summary> public override Task MatchEndpoint(MatchEndpointContext context) { if (context.Options.AuthorizationEndpointPath.HasValue && context.Request.Path.StartsWithSegments(context.Options.AuthorizationEndpointPath)) { context.MatchesAuthorizationEndpoint(); } return(Task.FromResult(true)); }
public override Task MatchEndpoint(MatchEndpointContext context) { // Note: by default, OpenIdConnectServerHandler only handles authorization requests made to the authorization endpoint. // This context handler uses a more relaxed policy that allows extracting authorization requests received at // /connect/authorize/accept and /connect/authorize/deny (see AuthorizationController.cs for more information). if (context.Options.AuthorizationEndpointPath.HasValue && context.Request.Path.StartsWithSegments(context.Options.AuthorizationEndpointPath)) { context.MatchesAuthorizationEndpoint(); } return(Task.FromResult <object>(null)); }
public override Task MatchEndpoint(MatchEndpointContext context) { if (!context.Options.AuthorizationEndpointPath.HasValue) return Task.CompletedTask; var requestPath = context.Request.Path; var authorizePath = context.Options.AuthorizationEndpointPath; if (ValidAuthorizeEndpoints.Any((endpoint) => (requestPath == authorizePath.Add(endpoint)))) context.MatchesAuthorizationEndpoint(); return Task.CompletedTask; }