mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Let CredentialsExtractors specify what type of Credentials they generate
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { CredentialGroup } from '../../../src/authentication/Credentials';
|
||||
import { EmptyCredentialsExtractor } from '../../../src/authentication/EmptyCredentialsExtractor';
|
||||
import type { HttpRequest } from '../../../src/server/HttpRequest';
|
||||
import { NotImplementedHttpError } from '../../../src/util/errors/NotImplementedHttpError';
|
||||
@@ -15,6 +16,6 @@ describe('An EmptyCredentialsExtractor', (): void => {
|
||||
it('returns the empty credentials.', async(): Promise<void> => {
|
||||
const headers = {};
|
||||
const result = extractor.handleSafe({ headers } as HttpRequest);
|
||||
await expect(result).resolves.toEqual({});
|
||||
await expect(result).resolves.toEqual({ [CredentialGroup.public]: {}});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user