fromProtectedResource

fun fromProtectedResource(resourceUri: Uri, retrieveAuthServer: (ResourceMetadata) -> Uri = { it.authorizationServers?.first() ?: error("No auth servers") }): AuthServerDiscovery

Work backwards from the original Url that you are attempting to access