def rsa_decode
      kid = header['kid']
      try = false

      begin
        rsa = @provider.keys[kid]
        raise KidNotFound, 'kid not found into provider keys' unless rsa

        JWT.decode(@jwt, rsa.public_key, true, algorithm: 'RS256')
      rescue JWT::VerificationError, KidNotFound
        raise if try

        @provider.load_keys # maybe keys have been changed
        try = true
        retry
      end
    end
def rsa_decode
      kid = header['kid']
      try = false

      begin
        rsa = @provider.keys[kid]
        raise KidNotFound, 'kid not found into provider keys' unless rsa

        JWT.decode(@jwt, rsa.public_key, true, algorithm: 'RS256')
      rescue JWT::VerificationError, KidNotFound
        raise if try

        @provider.load_keys # maybe keys have been changed
        try = true
        retry
      end
    end
Decodes the JWT with the signed secret