• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CommunitySolidServer / CommunitySolidServer / 15927130019

27 Jun 2025 01:11PM CUT coverage: 100.0%. Remained the same
15927130019

Pull #2041

github

web-flow
Merge b0bdff06b into a17747c24
Pull Request #2041: feat: URL client id for client credentials

1953 of 1953 branches covered (100.0%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 1 file covered. (100.0%)

9486 of 9486 relevant lines covered (100.0%)

809.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/authentication/UnsecureConstantCredentialsExtractor.ts
1
import { getLoggerFor } from '../logging/LogUtil';
320✔
2
import type { Credentials } from './Credentials';
3
import { CredentialsExtractor } from './CredentialsExtractor';
320✔
4

5
/**
6
 * Credentials extractor that authenticates a constant agent
7
 * (useful for development or debugging purposes).
8
 */
9
export class UnsecureConstantCredentialsExtractor extends CredentialsExtractor {
320✔
10
  private readonly credentials: Credentials;
11
  private readonly logger = getLoggerFor(this);
32✔
12

13
  public constructor(agent: string);
14
  public constructor(agent: Credentials['agent']);
15
  public constructor(agent: string | Credentials['agent']) {
16
    super();
32✔
17
    this.credentials = { agent: typeof agent === 'string' ? { webId: agent } : agent };
32✔
18
  }
19

20
  public async handle(): Promise<Credentials> {
21
    this.logger.info(`Agent unsecurely claims to be ${this.credentials.agent!.webId}`);
32✔
22
    return this.credentials;
32✔
23
  }
24
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc