summaryrefslogtreecommitdiff
path: root/app/graphql/types/x509_certificate_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/x509_certificate_type.rb')
-rw-r--r--app/graphql/types/x509_certificate_type.rb39
1 files changed, 39 insertions, 0 deletions
diff --git a/app/graphql/types/x509_certificate_type.rb b/app/graphql/types/x509_certificate_type.rb
new file mode 100644
index 00000000000..806aa441af7
--- /dev/null
+++ b/app/graphql/types/x509_certificate_type.rb
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+# rubocop:disable Graphql/AuthorizeTypes
+
+module Types
+ class X509CertificateType < Types::BaseObject
+ graphql_name 'X509Certificate'
+ description 'Represents an X.509 certificate.'
+
+ field :certificate_status, GraphQL::Types::String,
+ null: false,
+ description: 'Indicates if the certificate is good or revoked.'
+
+ field :created_at, Types::TimeType, null: false,
+ description: 'Timestamp of when the certificate was saved.'
+
+ field :email, GraphQL::Types::String, null: false,
+ description: 'Email associated with the cerificate.'
+
+ field :id, GraphQL::Types::ID, null: false, description: 'ID of the certificate.'
+
+ field :serial_number, GraphQL::Types::String, null: false,
+ description: 'Serial number of the certificate.'
+
+ field :subject, GraphQL::Types::String, null: false, description: 'Subject of the certificate.'
+
+ field :subject_key_identifier, GraphQL::Types::String,
+ null: false,
+ description: 'Subject key identifier of the certificate.'
+
+ field :updated_at, Types::TimeType, null: false,
+ description: 'Timestamp of when the certificate was last updated.'
+
+ field :x509_issuer, Types::X509IssuerType, null: false,
+ description: 'Issuer of the certificate.'
+ end
+end
+
+# rubocop:enable Graphql/AuthorizeTypes