mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Update dependencies
This commit is contained in:
@@ -30,7 +30,7 @@ export class BearerWebIdExtractor extends CredentialsExtractor {
|
||||
const { headers: { authorization }} = request;
|
||||
|
||||
try {
|
||||
const { webid: webId } = await this.verify(authorization as string);
|
||||
const { webid: webId } = await this.verify(authorization!);
|
||||
this.logger.info(`Verified WebID via Bearer access token: ${webId}`);
|
||||
return { webId };
|
||||
} catch (error: unknown) {
|
||||
|
||||
@@ -45,7 +45,7 @@ export class DPoPWebIdExtractor extends CredentialsExtractor {
|
||||
// and extract the WebID provided by the client
|
||||
try {
|
||||
const { webid: webId } = await this.verify(
|
||||
authorization as string,
|
||||
authorization!,
|
||||
{
|
||||
header: dpop as string,
|
||||
method: method as RequestMethod,
|
||||
|
||||
@@ -18,7 +18,7 @@ export class UnsecureWebIdExtractor extends CredentialsExtractor {
|
||||
}
|
||||
|
||||
public async handle({ headers }: HttpRequest): Promise<Credentials> {
|
||||
const webId = /^WebID\s+(.*)/u.exec(headers.authorization as string)![1];
|
||||
const webId = /^WebID\s+(.*)/u.exec(headers.authorization!)![1];
|
||||
this.logger.info(`Agent unsecurely claims to be ${webId}`);
|
||||
return { webId };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user