Пример #1
0
        public void Configure_SetsUpIdentityPathsAndCookie()
        {
            // Arrange
            var options   = new IdentityServerOptions();
            var configure = new AspNetConventionsConfigureOptions();

            // Act
            configure.Configure(options);

            // Assert
            Assert.Equal(IdentityConstants.ApplicationScheme, options.Authentication.CookieAuthenticationScheme);
        }
Пример #2
0
        public void Configure_SetsUpIdentityServerEvents()
        {
            // Arrange
            var options   = new IdentityServerOptions();
            var configure = new AspNetConventionsConfigureOptions();

            // Act
            configure.Configure(options);

            // Assert
            Assert.True(options.Events.RaiseErrorEvents);
            Assert.True(options.Events.RaiseInformationEvents);
            Assert.True(options.Events.RaiseFailureEvents);
            Assert.True(options.Events.RaiseSuccessEvents);
        }
        public void Configure_SetsUpIdentityPathsAndCookie()
        {
            // Arrange
            var options   = new IdentityServerOptions();
            var configure = new AspNetConventionsConfigureOptions();

            // Act
            configure.Configure(options);

            // Assert
            Assert.Equal("/Identity/Account/Login", options.UserInteraction.LoginUrl);
            Assert.Equal("/Identity/Account/Logout", options.UserInteraction.LogoutUrl);
            Assert.Equal("/Identity/Error", options.UserInteraction.ErrorUrl);
            Assert.Equal(IdentityConstants.ApplicationScheme, options.Authentication.CookieAuthenticationScheme);
        }