Example #1
0
        public void BearerToken_JsonContent_TokenRecognized()
        {
            string   content  = "{\"authentication\":{\"token\":\"" + BearerExample + "\",\"bid\":9,\"umail\":\"[email protected]\"}}";
            Response response = new Response(System.Net.HttpStatusCode.OK, content);

            BearerTokenizer tokenizer = new BearerTokenizer();
            TokenCollection tokens    = tokenizer.ExtractTokens(response);

            BearerToken match = new BearerToken(BearerExample);

            Assert.True(tokens.ContainsExactMatch(match) != null);
        }