configureProtectedResource method
void
configureProtectedResource({})
Configure the OAuth Protected Resource metadata served at
/.well-known/oauth-protected-resource (RFC 9728).
Implementation
void configureProtectedResource({
required String resource,
required List<String> authorizationServers,
List<String>? scopesSupported,
List<String>? bearerMethodsSupported,
String? resourceDocumentation,
}) {
_protectedResource = _ProtectedResourceMetadata(
resource: resource,
authorizationServers: List.unmodifiable(authorizationServers),
scopesSupported: scopesSupported == null
? null
: List.unmodifiable(scopesSupported),
bearerMethodsSupported: bearerMethodsSupported == null
? null
: List.unmodifiable(bearerMethodsSupported),
resourceDocumentation: resourceDocumentation,
);
}