mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00

Configuration has been updated so the IDP requests also pass through an Authorization component. A new config option was added to choose which authorization scheme to use for the IDP.
14 lines
601 B
TypeScript
14 lines
601 B
TypeScript
import { CredentialGroup } from '../../../src/authentication/Credentials';
|
|
import { PublicCredentialsExtractor } from '../../../src/authentication/PublicCredentialsExtractor';
|
|
import type { HttpRequest } from '../../../src/server/HttpRequest';
|
|
|
|
describe('A PublicCredentialsExtractor', (): void => {
|
|
const extractor = new PublicCredentialsExtractor();
|
|
|
|
it('returns the empty credentials.', async(): Promise<void> => {
|
|
const headers = {};
|
|
const result = extractor.handleSafe({ headers } as HttpRequest);
|
|
await expect(result).resolves.toEqual({ [CredentialGroup.public]: {}});
|
|
});
|
|
});
|