diff --git a/src/Flipt.Grpc/Auth.cs b/src/Flipt.Grpc/Auth.cs index 75ae948..cb71ee2 100644 --- a/src/Flipt.Grpc/Auth.cs +++ b/src/Flipt.Grpc/Auth.cs @@ -70,34 +70,39 @@ static AuthReflection() { "Y291bnRUb2tlbiKFAQocVmVyaWZ5U2VydmljZUFjY291bnRSZXNwb25zZRIh", "CgxjbGllbnRfdG9rZW4YASABKAlSC2NsaWVudFRva2VuEkIKDmF1dGhlbnRp", "Y2F0aW9uGAIgASgLMhouZmxpcHQuYXV0aC5BdXRoZW50aWNhdGlvblIOYXV0", - "aGVudGljYXRpb24qUwoGTWV0aG9kEg8KC01FVEhPRF9OT05FEAASEAoMTUVU", + "aGVudGljYXRpb24qZgoGTWV0aG9kEg8KC01FVEhPRF9OT05FEAASEAoMTUVU", "SE9EX1RPS0VOEAESDwoLTUVUSE9EX09JREMQAhIVChFNRVRIT0RfS1VCRVJO", - "RVRFUxADMoMBChtQdWJsaWNBdXRoZW50aWNhdGlvblNlcnZpY2USZAoZTGlz", - "dEF1dGhlbnRpY2F0aW9uTWV0aG9kcxIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0", - "eRotLmZsaXB0LmF1dGguTGlzdEF1dGhlbnRpY2F0aW9uTWV0aG9kc1Jlc3Bv", - "bnNlIgAy5wMKFUF1dGhlbnRpY2F0aW9uU2VydmljZRJNChVHZXRBdXRoZW50", - "aWNhdGlvblNlbGYSFi5nb29nbGUucHJvdG9idWYuRW1wdHkaGi5mbGlwdC5h", - "dXRoLkF1dGhlbnRpY2F0aW9uIgASVwoRR2V0QXV0aGVudGljYXRpb24SJC5m", - "bGlwdC5hdXRoLkdldEF1dGhlbnRpY2F0aW9uUmVxdWVzdBoaLmZsaXB0LmF1", - "dGguQXV0aGVudGljYXRpb24iABJoChNMaXN0QXV0aGVudGljYXRpb25zEiYu", - "ZmxpcHQuYXV0aC5MaXN0QXV0aGVudGljYXRpb25zUmVxdWVzdBonLmZsaXB0", - "LmF1dGguTGl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uTWV0aG9kT0lEQ1NlcnZpY2USUwoMQXV0", + "aG9yaXplVVJMEh8uZmxpcHQuYXV0aC5BdXRob3JpemVVUkxSZXF1ZXN0GiAu", + "ZmxpcHQuYXV0aC5BdXRob3JpemVVUkxSZXNwb25zZSIAEkcKCENhbGxiYWNr", + "EhsuZmxpcHQuYXV0aC5DYWxsYmFja1JlcXVlc3QaHC5mbGlwdC5hdXRoLkNh", + "bGxiYWNrUmVzcG9uc2UiADKUAQolQXV0aGVudGljYXRpb25NZXRob2RLdWJl", + "cm5ldGVzU2VydmljZRJrChRWZXJpZnlTZXJ2aWNlQWNjb3VudBInLmZsaXB0", + "LmF1dGguVmVyaWZ5U2VydmljZUFjY291bnRSZXF1ZXN0GiguZmxpcHQuYXV0", + "aC5WZXJpZnlTZXJ2aWNlQWNjb3VudFJlc3BvbnNlIgAywQEKIUF1dGhlbnRp", + "Y2F0aW9uTWV0aG9kR2l0aHViU2VydmljZRJTCgxBdXRob3JpemVVUkwSHy5m", + "bGlwdC5hdXRoLkF1dGhvcml6ZVVSTFJlcXVlc3QaIC5mbGlwdC5hdXRoLkF1", + "dGhvcml6ZVVSTFJlc3BvbnNlIgASRwoIQ2FsbGJhY2sSGy5mbGlwdC5hdXRo", + "LkNhbGxiYWNrUmVxdWVzdBocLmZsaXB0LmF1dGguQ2FsbGJhY2tSZXNwb25z", + "ZSIAQiJaIGdvLmZsaXB0LmlvL2ZsaXB0L3JwYy9mbGlwdC9hdXRoYgZwcm90", + "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Flipt.Auth.Method), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -128,6 +133,7 @@ public enum Method { [pbr::OriginalName("METHOD_TOKEN")] Token = 1, [pbr::OriginalName("METHOD_OIDC")] Oidc = 2, [pbr::OriginalName("METHOD_KUBERNETES")] Kubernetes = 3, + [pbr::OriginalName("METHOD_GITHUB")] Github = 4, } #endregion diff --git a/src/Flipt.Grpc/AuthGrpc.cs b/src/Flipt.Grpc/AuthGrpc.cs index 16dc977..256cfd2 100644 --- a/src/Flipt.Grpc/AuthGrpc.cs +++ b/src/Flipt.Grpc/AuthGrpc.cs @@ -722,5 +722,149 @@ protected override AuthenticationMethodKubernetesServiceClient NewInstance(Clien } } + public static partial class AuthenticationMethodGithubService + { + static readonly string __ServiceName = "flipt.auth.AuthenticationMethodGithubService"; + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (message is global::Google.Protobuf.IBufferMessage) + { + context.SetPayloadLength(message.CalculateSize()); + global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter()); + context.Complete(); + return; + } + #endif + context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static class __Helper_MessageCache + { + public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (__Helper_MessageCache.IsBufferMessage) + { + return parser.ParseFrom(context.PayloadAsReadOnlySequence()); + } + #endif + return parser.ParseFrom(context.PayloadAsNewBuffer()); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_flipt_auth_AuthorizeURLRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Flipt.Auth.AuthorizeURLRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_flipt_auth_AuthorizeURLResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Flipt.Auth.AuthorizeURLResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_flipt_auth_CallbackRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Flipt.Auth.CallbackRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_flipt_auth_CallbackResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Flipt.Auth.CallbackResponse.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_AuthorizeURL = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "AuthorizeURL", + __Marshaller_flipt_auth_AuthorizeURLRequest, + __Marshaller_flipt_auth_AuthorizeURLResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_Callback = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "Callback", + __Marshaller_flipt_auth_CallbackRequest, + __Marshaller_flipt_auth_CallbackResponse); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Flipt.Auth.AuthReflection.Descriptor.Services[5]; } + } + + /// Client for AuthenticationMethodGithubService + public partial class AuthenticationMethodGithubServiceClient : grpc::ClientBase + { + /// Creates a new client for AuthenticationMethodGithubService + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public AuthenticationMethodGithubServiceClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for AuthenticationMethodGithubService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public AuthenticationMethodGithubServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected AuthenticationMethodGithubServiceClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected AuthenticationMethodGithubServiceClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Flipt.Auth.AuthorizeURLResponse AuthorizeURL(global::Flipt.Auth.AuthorizeURLRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return AuthorizeURL(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Flipt.Auth.AuthorizeURLResponse AuthorizeURL(global::Flipt.Auth.AuthorizeURLRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_AuthorizeURL, null, options, request); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall AuthorizeURLAsync(global::Flipt.Auth.AuthorizeURLRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return AuthorizeURLAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall AuthorizeURLAsync(global::Flipt.Auth.AuthorizeURLRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_AuthorizeURL, null, options, request); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Flipt.Auth.CallbackResponse Callback(global::Flipt.Auth.CallbackRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return Callback(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Flipt.Auth.CallbackResponse Callback(global::Flipt.Auth.CallbackRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_Callback, null, options, request); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CallbackAsync(global::Flipt.Auth.CallbackRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CallbackAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CallbackAsync(global::Flipt.Auth.CallbackRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_Callback, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override AuthenticationMethodGithubServiceClient NewInstance(ClientBaseConfiguration configuration) + { + return new AuthenticationMethodGithubServiceClient(configuration); + } + } + + } } #endregion