< Summary

Information
Class: Api.Auth.Models.RemoteServiceToken
Assembly: Api
File(s): /home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/Auth/Models/RemoteServiceToken.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 30
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%

File(s)

/home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/Auth/Models/RemoteServiceToken.cs

#LineLine coverage
 1// SPDX-FileCopyrightText: 2026 Alper Çelik <alper@alper-celik.dev>
 2//
 3// SPDX-License-Identifier: AGPL-3.0-or-later
 4
 5using System.ComponentModel.DataAnnotations;
 6using System.ComponentModel.DataAnnotations.Schema;
 7using NodaTime;
 8
 9namespace Api.Auth.Models;
 10
 11[Table("remote_service_tokens")]
 12public class RemoteServiceToken : ITokenTime
 13{
 14    public const string ServiceIdentifierType = "ServiceIdentifierType";
 15    public const string ServiceAllowedJobsType = "ServiceAllowedJobsType";
 16    public const string ServiceImpersonatedUserHeader = "as_user";
 17
 18    [Key]
 19    public required byte[] TokenHash { get; set; }
 20
 21    [ForeignKey(nameof(RemoteService))]
 22    public Guid RemoteServiceId { get; set; }
 23
 24    public Instant CreationTime { get; set; }
 25
 26    public Instant? LastUsed { get; set; }
 27
 28    // Navigation Properties
 129    public RemoteService RemoteService { get; set; } = null!;
 30}

Methods/Properties

.ctor()