Ejemplo n.º 1
0
        public void ThenIdentityTokenContainsClaim(string key, string value)
        {
            var tokenPayload = _scenarioContext["tokenPayload"] as JwsPayload;

            Assert.True(tokenPayload.ContainsKey(key));
            Assert.Equal(WebApiSteps.ParseValue(value, _scenarioContext).ToString(), tokenPayload[key].ToString());
        }
Ejemplo n.º 2
0
 public void WhenExtractJwsPayloadFromAuthorizationRequest(string name)
 {
     var jws = WebApiSteps.ParseValue(name, _scenarioContext).ToString();
     var jwsGenerator = new JwsGeneratorFactory().BuildJwsGenerator();
     _scenarioContext.Set(jwsGenerator.ExtractPayload(jws), "tokenPayload");
     _scenarioContext.Set(jwsGenerator.ExtractHeader(jws), "jwsHeader");
 }