Exemplo n.º 1
0
        public async Task RequestResourceOwnerPassword_pass()
        {
            using (IdentityTestServer idServer = IdentityTestServer.CreateServer())
            {
                var token = await idServer.RequestResourceOwnerPasswordAsync("ro.client", "secret", "alice", "P@ssword1234", "api1");

                Assert.False(token.IsError);
            }
        }
Exemplo n.º 2
0
        public async Task RequestClientCredentials_badScope()
        {
            using (IdentityTestServer idServer = IdentityTestServer.CreateServer())
            {
                var token = await idServer.RequestClientCredentialsAsync("client", "secret", "api1bad");

                Assert.True(token.IsError);
            }
        }