@@ -68,15 +68,15 @@ public Program(ILoggerProvider? loggerProvider = null, IConnectionListenerFactor
6868 public bool ClientIdMetadataDocumentSupported { get ; set ; } = true ;
6969
7070 /// <summary>
71- /// Gets or sets a value indicating whether the authorization server requires a resource parameter.
71+ /// Gets or sets a value indicating whether the authorization server expects a resource parameter.
7272 /// When <c>true</c>, the resource parameter must be present and match a valid resource.
7373 /// When <c>false</c>, the resource parameter must be absent to simulate legacy servers that
7474 /// do not support RFC 8707 resource indicators.
7575 /// </summary>
7676 /// <remarks>
7777 /// The default value is <c>true</c>.
7878 /// </remarks>
79- public bool RequireResource { get ; set ; } = true ;
79+ public bool ExpectResource { get ; set ; } = true ;
8080
8181 public HashSet < string > DisabledMetadataPaths { get ; } = new ( StringComparer . OrdinalIgnoreCase ) ;
8282 public IReadOnlyCollection < string > MetadataRequests => _metadataRequests . ToArray ( ) ;
@@ -301,8 +301,8 @@ IResult HandleMetadataRequest(HttpContext context, string? issuerPath = null)
301301 }
302302
303303 // Validate resource in accordance with RFC 8707.
304- // When RequireResource is false, the resource parameter must be absent (legacy mode).
305- if ( RequireResource ? ( string . IsNullOrEmpty ( resource ) || ! ValidResources . Contains ( resource ) ) : ! string . IsNullOrEmpty ( resource ) )
304+ // When ExpectResource is false, the resource parameter must be absent (legacy mode).
305+ if ( ExpectResource ? ( string . IsNullOrEmpty ( resource ) || ! ValidResources . Contains ( resource ) ) : ! string . IsNullOrEmpty ( resource ) )
306306 {
307307 return Results . Redirect ( $ "{ redirect_uri } ?error=invalid_target&error_description=The+specified+resource+is+not+valid&state={ state } ") ;
308308 }
@@ -349,9 +349,9 @@ IResult HandleMetadataRequest(HttpContext context, string? issuerPath = null)
349349 }
350350
351351 // Validate resource in accordance with RFC 8707.
352- // When RequireResource is false, the resource parameter must be absent (legacy mode).
352+ // When ExpectResource is false, the resource parameter must be absent (legacy mode).
353353 var resource = form [ "resource" ] . ToString ( ) ;
354- if ( RequireResource ? ( string . IsNullOrEmpty ( resource ) || ! ValidResources . Contains ( resource ) ) : ! string . IsNullOrEmpty ( resource ) )
354+ if ( ExpectResource ? ( string . IsNullOrEmpty ( resource ) || ! ValidResources . Contains ( resource ) ) : ! string . IsNullOrEmpty ( resource ) )
355355 {
356356 return Results . BadRequest ( new OAuthErrorResponse
357357 {
0 commit comments