Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }