async Task <D2LSecurityToken> IPublicKeyProvider.GetByIdAsync(string id) { D2LSecurityToken result = m_cache.Get(m_jwksProvider.Namespace, id); if (result != null) { return(result); } JsonWebKeySet jwks = await m_jwksProvider .RequestJwkAsync(id) .ConfigureAwait(false); CacheJwks(m_cache, m_jwksProvider.Namespace, jwks); result = m_cache.Get(m_jwksProvider.Namespace, id); if (result != null) { return(result); } throw new PublicKeyNotFoundException(id, jwks.Source.AbsoluteUri); }