示例#1
0
 public override Task MatchEndpoint(MatchEndpointContext context)
 {
     if (context.Options.AuthorizationEndpointPath.HasValue &&
         context.Request.Path.Value.StartsWith(context.Options.AuthorizationEndpointPath))
     {
         context.MatchAuthorizationEndpoint();
     }
     return(Task.CompletedTask);
 }
示例#2
0
        public override Task MatchEndpoint(MatchEndpointContext context)
        {
            // Note: by default, OpenIdConnectServerHandler only handles authorization requests made to the authorization endpoint.
            // This notification handler uses a more relaxed policy that allows extracting authorization requests received at
            // /connect/authorize/accept and /connect/authorize/deny (see AuthorizationModule.cs for more information).
            if (context.Options.AuthorizationEndpointPath.HasValue &&
                context.Request.Path.StartsWithSegments(context.Options.AuthorizationEndpointPath))
            {
                context.MatchAuthorizationEndpoint();
            }

            return(Task.FromResult(0));
        }
示例#3
0
 public override Task MatchEndpoint(MatchEndpointContext context)
 {
     // Note: by default, the OIDC server middleware only handles authorization requests made to
     // AuthorizationEndpointPath. This handler uses a more relaxed policy that allows extracting
     // authorization requests received at /connect/authorize/accept and /connect/authorize/deny.
     if (context.Options.AuthorizationEndpointPath.HasValue &&
         context.Request.Path.Value.StartsWith(context.Options.AuthorizationEndpointPath))
     {
         context.MatchAuthorizationEndpoint();
     }
     else if (context.Options.RevocationEndpointPath.HasValue &&
              context.Request.Path.Value.StartsWith(context.Options.RevocationEndpointPath))
     {
         context.MatchRevocationEndpoint();
     }
     return(Task.CompletedTask);
 }