| 1 | namespace IntercomService.Options; |
| 2 | |
| 3 | public sealed class IntercomOptions |
| 4 | { |
| 5 | public const string SectionName = "Intercom"; |
| 6 | |
| 7 | public string DataDirectory { get; set; } = "data"; |
| 8 | |
| 9 | public string DatabaseFileName { get; set; } = "intercom.witdb"; |
| 10 | |
| 11 | public bool RecreateDatabaseOnStart { get; set; } |
| 12 | } |
| 13 | |
| 14 | public sealed class JwtOptions |
| 15 | { |
| 16 | public const string SectionName = "Jwt"; |
| 17 | |
| 18 | public string Issuer { get; set; } = "intercom-service"; |
| 19 | |
| 20 | public string Audience { get; set; } = "intercom-api"; |
| 21 | |
| 22 | public string SigningKey { get; set; } = ""; |
| 23 | |
| 24 | public int AccessTokenMinutes { get; set; } = 60; |
| 25 | |
| 26 | public int RefreshTokenDays { get; set; } = 30; |
| 27 | } |
| 28 | |
| 29 | public sealed class GitHubAuthOptions |
| 30 | { |
| 31 | public const string SectionName = "GitHub"; |
| 32 | |
| 33 | public string ClientId { get; set; } = ""; |
| 34 | |
| 35 | public string ClientSecret { get; set; } = ""; |
| 36 | } |
| 37 | |
| 38 | public sealed class DevAuthOptions |
| 39 | { |
| 40 | public const string SectionName = "DevAuth"; |
| 41 | |
| 42 | public string? TeamToken { get; set; } |
| 43 | |
| 44 | public string MemberId { get; set; } = "dev-member"; |
| 45 | |
| 46 | public string DisplayName { get; set; } = "Dev Operator"; |
| 47 | } |
| 48 | |
| 49 | public sealed class OidcAuthOptions |
| 50 | { |
| 51 | public const string SectionName = "Oidc"; |
| 52 | |
| 53 | public string Authority { get; set; } = ""; |
| 54 | |
| 55 | public string ClientId { get; set; } = ""; |
| 56 | |
| 57 | public string ClientSecret { get; set; } = ""; |
| 58 | |
| 59 | public string Scopes { get; set; } = "openid profile email"; |
| 60 | |
| 61 | public string ProviderId { get; set; } = "oidc"; |
| 62 | |
| 63 | public string DisplayName { get; set; } = "OpenID Connect"; |
| 64 | } |
| 65 | |