コード例 #1
0
    public void SelectScheme_ReturnsTheDefaultScheme_ForOtherPaths(string path)
    {
        // Arrange
        var selector = new IdentityServerJwtPolicySchemeForwardSelector("/Identity", "Local");
        var ctx      = new DefaultHttpContext();

        ctx.Request.Path = path;

        // Act
        var scheme = selector.SelectScheme(ctx);

        // Assert
        Assert.Equal("Local", scheme);
    }
コード例 #2
0
    public void SelectScheme_ReturnsTheIdentityApplicationScheme_ForIdentityRelatedPaths(string path)
    {
        // Arrange
        var selector = new IdentityServerJwtPolicySchemeForwardSelector("/Identity", "Local");
        var ctx      = new DefaultHttpContext();

        ctx.Request.Path = path;

        // Act
        var scheme = selector.SelectScheme(ctx);

        // Assert
        Assert.Equal(IdentityConstants.ApplicationScheme, scheme);
    }