public virtual bool OnVerifyAccessToken(string accessToken) { var url = VerifyTokenUrl.Fmt(accessToken); var json = url.GetJsonFromUrl(); var obj = JsonObject.Parse(json); var issuedTo = obj["issued_to"]; return(issuedTo == ConsumerKey); }
public virtual async Task <bool> OnVerifyAccessTokenAsync(string accessToken, AuthContext ctx) { var url = VerifyTokenUrl.Fmt(accessToken); var json = await url.GetJsonFromUrlAsync(); var obj = JsonObject.Parse(json); var issuedTo = obj["issued_to"]; return(issuedTo == ConsumerKey); }