mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: add additional supported interfaces
This includes the relevant auth headers and a simplification of several others.
This commit is contained in:
6
src/authentication/Credentials.ts
Normal file
6
src/authentication/Credentials.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Credentials identifying an entity accessing or owning data.
|
||||
*/
|
||||
export interface Credentials {
|
||||
webID: string;
|
||||
}
|
||||
15
src/authentication/CredentialsExtractor.ts
Normal file
15
src/authentication/CredentialsExtractor.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Credentials } from './Credentials';
|
||||
import { HttpRequest } from '../server/HttpRequest';
|
||||
|
||||
/**
|
||||
* Responsible for extracting credentials.
|
||||
*/
|
||||
export interface CredentialsExtractor {
|
||||
/**
|
||||
* Extracts the credentials found in an HttpRequest.
|
||||
*
|
||||
* @param request - The incoming request.
|
||||
* @returns A promise resolving to the credentials.
|
||||
*/
|
||||
extractCredentials: (request: HttpRequest) => Promise<Credentials>;
|
||||
}
|
||||
Reference in New Issue
Block a user