applyAuthnForToken
suspend fun applyAuthnForToken(oauthMetadata: OAuth2AuthorizationServerMetadata, popAudience: String, resourceUrl: String, httpMethod: HttpMethod, useDpop: Boolean): HttpRequestBuilder.() -> Unit(source)
Sets the appropriate headers when accessing a token endpoint:
loads client attestation when loadClientAttestationJwt is set
sends a DPoP proof when useDpop is set Previously, this method evaluated oauthMetadata, but authorization servers are not required to set the corresponding fields in the metadata, so we set the headers anyway.