| 1 | namespace AgentForge.Options; |
| 2 | |
| 3 | public sealed class ForgeOAuthOptions |
| 4 | { |
| 5 | public ForgeGitHubOAuthOptions GitHub { get; set; } = new(); |
| 6 | |
| 7 | public ForgeOidcOAuthOptions Oidc { get; set; } = new(); |
| 8 | } |
| 9 | |
| 10 | public sealed class ForgeGitHubOAuthOptions |
| 11 | { |
| 12 | public string ClientId { get; set; } = ""; |
| 13 | |
| 14 | public string ClientSecret { get; set; } = ""; |
| 15 | |
| 16 | public bool IsConfigured => |
| 17 | !string.IsNullOrWhiteSpace(ClientId) && !string.IsNullOrWhiteSpace(ClientSecret); |
| 18 | } |
| 19 | |
| 20 | public sealed class ForgeOidcOAuthOptions |
| 21 | { |
| 22 | public string ProviderId { get; set; } = "oidc"; |
| 23 | |
| 24 | public string DisplayName { get; set; } = "SSO"; |
| 25 | |
| 26 | public string Authority { get; set; } = ""; |
| 27 | |
| 28 | public string ClientId { get; set; } = ""; |
| 29 | |
| 30 | public string ClientSecret { get; set; } = ""; |
| 31 | |
| 32 | public string Scope { get; set; } = "openid profile email"; |
| 33 | |
| 34 | public bool IsConfigured => |
| 35 | !string.IsNullOrWhiteSpace(Authority) |
| 36 | && !string.IsNullOrWhiteSpace(ClientId) |
| 37 | && !string.IsNullOrWhiteSpace(ClientSecret); |
| 38 | } |
| 39 | |
View only · write via MCP/CIDE