mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-18 17:44:20 +01:00
auth+proxy: extend Authenticator methods with target service name
The target service name remains unused in its current form, but will be required in order to verify that an incoming request with an LSAT attached is authorized to access the service being attempted. We can derive this from the request's host field, but we choose to extend the methods with the additional parameter in order to prevent parsing the host field again to determine which service is being accessed.
This commit is contained in:
@@ -141,7 +141,7 @@ func TestLsatAuthenticator(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, testCase := range headerTests {
|
||||
result := a.Accept(testCase.header)
|
||||
result := a.Accept(testCase.header, "test")
|
||||
if result != testCase.result {
|
||||
t.Fatalf("test case %s failed. got %v expected %v",
|
||||
testCase.id, result, testCase.result)
|
||||
|
||||
Reference in New Issue
Block a user