Test_BasicAuth_WWWAuthenticateHeader() — fiber Function Reference
Architecture documentation for the Test_BasicAuth_WWWAuthenticateHeader() function in basicauth_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 76a93747_bad5_07c6_34f8_c61d010d94fe["Test_BasicAuth_WWWAuthenticateHeader()"] c1fa52c0_acd4_56de_8c46_542417f3c9b8["basicauth_test.go"] 76a93747_bad5_07c6_34f8_c61d010d94fe -->|defined in| c1fa52c0_acd4_56de_8c46_542417f3c9b8 bfd8a9b6_0e17_60de_7e62_37b7a2f1750e["sha256Hash()"] 76a93747_bad5_07c6_34f8_c61d010d94fe -->|calls| bfd8a9b6_0e17_60de_7e62_37b7a2f1750e style 76a93747_bad5_07c6_34f8_c61d010d94fe fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/basicauth/basicauth_test.go lines 138–149
func Test_BasicAuth_WWWAuthenticateHeader(t *testing.T) {
t.Parallel()
app := fiber.New()
hashedJohn := sha256Hash("doe")
app.Use(New(Config{Users: map[string]string{"john": hashedJohn}}))
resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, "/", http.NoBody))
require.NoError(t, err)
require.Equal(t, fiber.StatusUnauthorized, resp.StatusCode)
require.Equal(t, `Basic realm="Restricted", charset="UTF-8"`, resp.Header.Get(fiber.HeaderWWWAuthenticate))
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does Test_BasicAuth_WWWAuthenticateHeader() do?
Test_BasicAuth_WWWAuthenticateHeader() is a function in the fiber codebase, defined in middleware/basicauth/basicauth_test.go.
Where is Test_BasicAuth_WWWAuthenticateHeader() defined?
Test_BasicAuth_WWWAuthenticateHeader() is defined in middleware/basicauth/basicauth_test.go at line 138.
What does Test_BasicAuth_WWWAuthenticateHeader() call?
Test_BasicAuth_WWWAuthenticateHeader() calls 1 function(s): sha256Hash.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free