mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-18 01:24:19 +01:00
auth: send LSAT and L402 Authorization headers
Again, as with WWW-Authenticate header, existing aperture instances expect LSAT, and the protocol defines it is L402, so send both, LSAT first, to maintain backward compatibility. The header "Authorization: LSAT..." can be removed in the future, when all aperture instances are upgraded.
This commit is contained in:
@@ -100,11 +100,33 @@ func TestL402Authenticator(t *testing.T) {
|
||||
result: false,
|
||||
},
|
||||
{
|
||||
id: "valid auth header",
|
||||
id: "valid auth header (both LSAT and L402)",
|
||||
header: &http.Header{
|
||||
l402.HeaderAuthorization: []string{
|
||||
"LSAT " + testMacBase64 + ":" +
|
||||
testPreimage,
|
||||
"L402 " + testMacBase64 + ":" +
|
||||
testPreimage,
|
||||
},
|
||||
},
|
||||
result: true,
|
||||
},
|
||||
{
|
||||
id: "valid auth header (LSAT only)",
|
||||
header: &http.Header{
|
||||
l402.HeaderAuthorization: []string{
|
||||
"LSAT " + testMacBase64 + ":" +
|
||||
testPreimage,
|
||||
},
|
||||
},
|
||||
result: true,
|
||||
},
|
||||
{
|
||||
id: "valid auth header (L402 only)",
|
||||
header: &http.Header{
|
||||
l402.HeaderAuthorization: []string{
|
||||
"L402 " + testMacBase64 + ":" +
|
||||
testPreimage,
|
||||
},
|
||||
},
|
||||
result: true,
|
||||
|
||||
Reference in New Issue
Block a user