fromProtectedResource

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

Work backwards from the original Url that you are attempting to access. Pass an optional expectedResource when they may differ