From cc9a3e95cac7ca6ac991e2995e717ac75a4880fa Mon Sep 17 00:00:00 2001 From: Lakhan Samani Date: Sat, 30 May 2026 15:11:49 +0530 Subject: [PATCH 1/3] refactor(proto): consolidate to single Authorizer service; method names mirror GraphQL ops MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User direction: collapse the nine per-resource proto services (Meta, User, Session, MagicLink, EmailVerification, PasswordReset, OtpChallenge, Token, Authz) into a single Authorizer service with method names that match the GraphQL operation names 1:1. Trade-offs ========== Pros: - Surface mirrors what existing GraphQL users already know (Signup, Login, Logout, Meta, Profile, Session, Permissions, ValidateJwtToken, ...). - Single typed client per language; SDK discovery is trivial. - No resource-name conventions to learn; method = verb. Cons (vs the prior AIP-121/122 resource-oriented design): - Loses List/Get/Create symmetry per resource — acceptable for an auth surface where most ops are stateless verbs. - Adding new resources scales worse than per-service. Acceptable: the public auth surface is fairly stable; admin services that DO want resource orientation already live on GraphQL (out of scope here). Design choices called out ========================= 1. Buf STANDARD's RPC_REQUEST_RESPONSE_UNIQUE remains enforced. Methods whose underlying payload is shared (AuthResponse, User, Meta) wrap that payload in per-RPC SignupResponse/LoginResponse/MetaResponse/etc. One extra accessor on the client side; one extra field per response. 2. SERVICE_SUFFIX lint excepted in buf.yaml. The single service is intentionally named "Authorizer" rather than "AuthorizerService" — it IS the authorizer, not "one of many authorizer services". 3. REST mapping: - GET /v1/{method} for genuinely-empty queries (Meta, Profile, Permissions, Logout) - POST /v1/{method} for everything else Path uses snake_case method name (POST /v1/magic_link_login, /v1/forgot_password, etc.) so REST clients see the same identifier they'd see in GraphQL. 4. MCP-exposed tools (proto annotation mcp_tool.exposed=true): meta, profile, session, permissions. Credential-bearing methods (Signup, Login, password/OTP/reset) stay unexposed. Files ===== DELETED proto/authorizer/{meta,user,session,verification,token,authz}/v1/** gen/go/authorizer/{meta,user,session,verification,token,authz}/v1/** internal/grpcsrv/handlers/{meta,stubs}.go NEW proto/authorizer/v1/authorizer.proto (single service, 19 RPCs) proto/authorizer/v1/types.proto (shared User, AuthResponse, Meta, Permission) gen/go/authorizer/v1/** (regenerated) internal/grpcsrv/handlers/authorizer.go (Meta real, rest Unimplemented) UPDATED proto/buf.yaml — except SERVICE_SUFFIX internal/grpcsrv/server.go — register single Authorizer service internal/gateway/mount.go — register single Authorizer handler internal/integration_tests/grpc_meta_test.go — Authorizer.Meta internal/integration_tests/grpc_surface_test.go — 18 Authorizer methods internal/integration_tests/rest_meta_test.go — wrapped response shape internal/integration_tests/mcp_test.go — discovers 4 MCP tools internal/integration_tests/mcp_stubs_test.go — permissions stub internal/mcp/schema_test.go — uses authorizerv1 internal/grpcsrv/interceptors/interceptors_test.go — uses authorizerv1 UNCHANGED internal/mcp/scanner.go, schema.go, server.go — annotation-driven; discovers tools from any proto package without modification internal/grpcsrv/transport/grpc_metadata.go — generic gRPC bridge internal/service/ — transport-agnostic cmd/root.go — same wiring shape Tests ===== All 17 packages green: ok internal/integration_tests 65s ok internal/grpcsrv/{interceptors,transport} ok internal/mcp / service / cookie / parsers / ... TestAuthorizerStubsReturnUnimplemented locks down the contract for all 18 not-yet-migrated methods; TestMCPListAndCallMeta verifies the four MCP-exposed tools surface from the single service. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../authorizer/authz/v1/authz_service.pb.go | 262 -- .../authz/v1/authz_service.pb.gw.go | 156 - .../authz/v1/authz_service_grpc.pb.go | 131 - gen/go/authorizer/meta/v1/meta_service.pb.go | 421 --- .../authorizer/meta/v1/meta_service.pb.gw.go | 156 - .../meta/v1/meta_service_grpc.pb.go | 127 - .../session/v1/magic_link_service.pb.go | 254 -- .../session/v1/magic_link_service.pb.gw.go | 164 - .../session/v1/magic_link_service_grpc.pb.go | 133 - gen/go/authorizer/session/v1/session.pb.go | 335 -- .../session/v1/session_service.pb.go | 1029 ------ .../session/v1/session_service.pb.gw.go | 397 --- .../session/v1/session_service_grpc.pb.go | 265 -- .../authorizer/token/v1/token_service.pb.go | 429 --- .../token/v1/token_service.pb.gw.go | 267 -- .../token/v1/token_service_grpc.pb.go | 177 -- gen/go/authorizer/user/v1/user.pb.go | 348 -- gen/go/authorizer/user/v1/user_service.pb.go | 849 ----- .../authorizer/user/v1/user_service.pb.gw.go | 455 --- .../user/v1/user_service_grpc.pb.go | 265 -- gen/go/authorizer/v1/authorizer.pb.go | 2824 +++++++++++++++++ gen/go/authorizer/v1/authorizer.pb.gw.go | 1518 +++++++++ gen/go/authorizer/v1/authorizer_grpc.pb.go | 849 +++++ gen/go/authorizer/v1/types.pb.go | 913 ++++++ .../v1/email_verification_service.pb.go | 376 --- .../v1/email_verification_service.pb.gw.go | 275 -- .../v1/email_verification_service_grpc.pb.go | 175 - .../v1/otp_challenge_service.pb.go | 417 --- .../v1/otp_challenge_service.pb.gw.go | 275 -- .../v1/otp_challenge_service_grpc.pb.go | 175 - .../v1/password_reset_service.pb.go | 415 --- .../v1/password_reset_service.pb.gw.go | 275 -- .../v1/password_reset_service_grpc.pb.go | 175 - gen/openapi/authorizer.swagger.json | 1222 ++++--- internal/gateway/mount.go | 27 +- internal/grpcsrv/handlers/authorizer.go | 60 + internal/grpcsrv/handlers/meta.go | 51 - internal/grpcsrv/handlers/stubs.go | 65 - .../grpcsrv/interceptors/interceptors_test.go | 20 +- internal/grpcsrv/server.go | 24 +- internal/integration_tests/grpc_meta_test.go | 17 +- .../integration_tests/grpc_surface_test.go | 102 +- internal/integration_tests/mcp_stubs_test.go | 13 +- internal/integration_tests/mcp_test.go | 40 +- internal/integration_tests/rest_meta_test.go | 15 +- internal/mcp/schema_test.go | 59 +- proto/authorizer/authz/v1/authz_service.proto | 29 - proto/authorizer/meta/v1/meta_service.proto | 45 - .../session/v1/magic_link_service.proto | 36 - proto/authorizer/session/v1/session.proto | 30 - .../session/v1/session_service.proto | 127 - proto/authorizer/token/v1/token_service.proto | 57 - proto/authorizer/user/v1/user.proto | 37 - proto/authorizer/user/v1/user_service.proto | 125 - proto/authorizer/v1/authorizer.proto | 410 +++ proto/authorizer/v1/types.proto | 93 + .../v1/email_verification_service.proto | 60 - .../v1/otp_challenge_service.proto | 63 - .../v1/password_reset_service.proto | 62 - proto/buf.yaml | 5 + 60 files changed, 7370 insertions(+), 10806 deletions(-) delete mode 100644 gen/go/authorizer/authz/v1/authz_service.pb.go delete mode 100644 gen/go/authorizer/authz/v1/authz_service.pb.gw.go delete mode 100644 gen/go/authorizer/authz/v1/authz_service_grpc.pb.go delete mode 100644 gen/go/authorizer/meta/v1/meta_service.pb.go delete mode 100644 gen/go/authorizer/meta/v1/meta_service.pb.gw.go delete mode 100644 gen/go/authorizer/meta/v1/meta_service_grpc.pb.go delete mode 100644 gen/go/authorizer/session/v1/magic_link_service.pb.go delete mode 100644 gen/go/authorizer/session/v1/magic_link_service.pb.gw.go delete mode 100644 gen/go/authorizer/session/v1/magic_link_service_grpc.pb.go delete mode 100644 gen/go/authorizer/session/v1/session.pb.go delete mode 100644 gen/go/authorizer/session/v1/session_service.pb.go delete mode 100644 gen/go/authorizer/session/v1/session_service.pb.gw.go delete mode 100644 gen/go/authorizer/session/v1/session_service_grpc.pb.go delete mode 100644 gen/go/authorizer/token/v1/token_service.pb.go delete mode 100644 gen/go/authorizer/token/v1/token_service.pb.gw.go delete mode 100644 gen/go/authorizer/token/v1/token_service_grpc.pb.go delete mode 100644 gen/go/authorizer/user/v1/user.pb.go delete mode 100644 gen/go/authorizer/user/v1/user_service.pb.go delete mode 100644 gen/go/authorizer/user/v1/user_service.pb.gw.go delete mode 100644 gen/go/authorizer/user/v1/user_service_grpc.pb.go create mode 100644 gen/go/authorizer/v1/authorizer.pb.go create mode 100644 gen/go/authorizer/v1/authorizer.pb.gw.go create mode 100644 gen/go/authorizer/v1/authorizer_grpc.pb.go create mode 100644 gen/go/authorizer/v1/types.pb.go delete mode 100644 gen/go/authorizer/verification/v1/email_verification_service.pb.go delete mode 100644 gen/go/authorizer/verification/v1/email_verification_service.pb.gw.go delete mode 100644 gen/go/authorizer/verification/v1/email_verification_service_grpc.pb.go delete mode 100644 gen/go/authorizer/verification/v1/otp_challenge_service.pb.go delete mode 100644 gen/go/authorizer/verification/v1/otp_challenge_service.pb.gw.go delete mode 100644 gen/go/authorizer/verification/v1/otp_challenge_service_grpc.pb.go delete mode 100644 gen/go/authorizer/verification/v1/password_reset_service.pb.go delete mode 100644 gen/go/authorizer/verification/v1/password_reset_service.pb.gw.go delete mode 100644 gen/go/authorizer/verification/v1/password_reset_service_grpc.pb.go create mode 100644 internal/grpcsrv/handlers/authorizer.go delete mode 100644 internal/grpcsrv/handlers/meta.go delete mode 100644 internal/grpcsrv/handlers/stubs.go delete mode 100644 proto/authorizer/authz/v1/authz_service.proto delete mode 100644 proto/authorizer/meta/v1/meta_service.proto delete mode 100644 proto/authorizer/session/v1/magic_link_service.proto delete mode 100644 proto/authorizer/session/v1/session.proto delete mode 100644 proto/authorizer/session/v1/session_service.proto delete mode 100644 proto/authorizer/token/v1/token_service.proto delete mode 100644 proto/authorizer/user/v1/user.proto delete mode 100644 proto/authorizer/user/v1/user_service.proto create mode 100644 proto/authorizer/v1/authorizer.proto create mode 100644 proto/authorizer/v1/types.proto delete mode 100644 proto/authorizer/verification/v1/email_verification_service.proto delete mode 100644 proto/authorizer/verification/v1/otp_challenge_service.proto delete mode 100644 proto/authorizer/verification/v1/password_reset_service.proto diff --git a/gen/go/authorizer/authz/v1/authz_service.pb.go b/gen/go/authorizer/authz/v1/authz_service.pb.go deleted file mode 100644 index 4a1d0f5e..00000000 --- a/gen/go/authorizer/authz/v1/authz_service.pb.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/authz/v1/authz_service.proto - -package authzv1 - -import ( - _ "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ListMyPermissionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListMyPermissionsRequest) Reset() { - *x = ListMyPermissionsRequest{} - mi := &file_authorizer_authz_v1_authz_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMyPermissionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMyPermissionsRequest) ProtoMessage() {} - -func (x *ListMyPermissionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_authz_v1_authz_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMyPermissionsRequest.ProtoReflect.Descriptor instead. -func (*ListMyPermissionsRequest) Descriptor() ([]byte, []int) { - return file_authorizer_authz_v1_authz_service_proto_rawDescGZIP(), []int{0} -} - -type ListMyPermissionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Permissions []*Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` -} - -func (x *ListMyPermissionsResponse) Reset() { - *x = ListMyPermissionsResponse{} - mi := &file_authorizer_authz_v1_authz_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMyPermissionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMyPermissionsResponse) ProtoMessage() {} - -func (x *ListMyPermissionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_authz_v1_authz_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMyPermissionsResponse.ProtoReflect.Descriptor instead. -func (*ListMyPermissionsResponse) Descriptor() ([]byte, []int) { - return file_authorizer_authz_v1_authz_service_proto_rawDescGZIP(), []int{1} -} - -func (x *ListMyPermissionsResponse) GetPermissions() []*Permission { - if x != nil { - return x.Permissions - } - return nil -} - -type Permission struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` -} - -func (x *Permission) Reset() { - *x = Permission{} - mi := &file_authorizer_authz_v1_authz_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Permission) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Permission) ProtoMessage() {} - -func (x *Permission) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_authz_v1_authz_service_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Permission.ProtoReflect.Descriptor instead. -func (*Permission) Descriptor() ([]byte, []int) { - return file_authorizer_authz_v1_authz_service_proto_rawDescGZIP(), []int{2} -} - -func (x *Permission) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *Permission) GetScope() string { - if x != nil { - return x.Scope - } - return "" -} - -var File_authorizer_authz_v1_authz_service_proto protoreflect.FileDescriptor - -var file_authorizer_authz_v1_authz_service_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, - 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x79, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x5e, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x79, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, - 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x3e, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x32, 0xab, 0x01, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x9a, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x79, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x79, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x79, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, - 0x6d, 0x65, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xe2, - 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x41, 0x75, 0x74, 0x68, - 0x7a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x3b, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x41, 0x58, 0xaa, 0x02, 0x13, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_authz_v1_authz_service_proto_rawDescOnce sync.Once - file_authorizer_authz_v1_authz_service_proto_rawDescData = file_authorizer_authz_v1_authz_service_proto_rawDesc -) - -func file_authorizer_authz_v1_authz_service_proto_rawDescGZIP() []byte { - file_authorizer_authz_v1_authz_service_proto_rawDescOnce.Do(func() { - file_authorizer_authz_v1_authz_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_authz_v1_authz_service_proto_rawDescData) - }) - return file_authorizer_authz_v1_authz_service_proto_rawDescData -} - -var file_authorizer_authz_v1_authz_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_authorizer_authz_v1_authz_service_proto_goTypes = []any{ - (*ListMyPermissionsRequest)(nil), // 0: authorizer.authz.v1.ListMyPermissionsRequest - (*ListMyPermissionsResponse)(nil), // 1: authorizer.authz.v1.ListMyPermissionsResponse - (*Permission)(nil), // 2: authorizer.authz.v1.Permission -} -var file_authorizer_authz_v1_authz_service_proto_depIdxs = []int32{ - 2, // 0: authorizer.authz.v1.ListMyPermissionsResponse.permissions:type_name -> authorizer.authz.v1.Permission - 0, // 1: authorizer.authz.v1.AuthzService.ListMyPermissions:input_type -> authorizer.authz.v1.ListMyPermissionsRequest - 1, // 2: authorizer.authz.v1.AuthzService.ListMyPermissions:output_type -> authorizer.authz.v1.ListMyPermissionsResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_authorizer_authz_v1_authz_service_proto_init() } -func file_authorizer_authz_v1_authz_service_proto_init() { - if File_authorizer_authz_v1_authz_service_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_authz_v1_authz_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_authorizer_authz_v1_authz_service_proto_goTypes, - DependencyIndexes: file_authorizer_authz_v1_authz_service_proto_depIdxs, - MessageInfos: file_authorizer_authz_v1_authz_service_proto_msgTypes, - }.Build() - File_authorizer_authz_v1_authz_service_proto = out.File - file_authorizer_authz_v1_authz_service_proto_rawDesc = nil - file_authorizer_authz_v1_authz_service_proto_goTypes = nil - file_authorizer_authz_v1_authz_service_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/authz/v1/authz_service.pb.gw.go b/gen/go/authorizer/authz/v1/authz_service.pb.gw.go deleted file mode 100644 index b64ba7b3..00000000 --- a/gen/go/authorizer/authz/v1/authz_service.pb.gw.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: authorizer/authz/v1/authz_service.proto - -/* -Package authzv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package authzv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_AuthzService_ListMyPermissions_0(ctx context.Context, marshaler runtime.Marshaler, client AuthzServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListMyPermissionsRequest - var metadata runtime.ServerMetadata - - msg, err := client.ListMyPermissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AuthzService_ListMyPermissions_0(ctx context.Context, marshaler runtime.Marshaler, server AuthzServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListMyPermissionsRequest - var metadata runtime.ServerMetadata - - msg, err := server.ListMyPermissions(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterAuthzServiceHandlerServer registers the http handlers for service AuthzService to "mux". -// UnaryRPC :call AuthzServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthzServiceHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterAuthzServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthzServiceServer) error { - - mux.Handle("GET", pattern_AuthzService_ListMyPermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.authz.v1.AuthzService/ListMyPermissions", runtime.WithHTTPPathPattern("/v1/users/me/permissions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AuthzService_ListMyPermissions_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthzService_ListMyPermissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterAuthzServiceHandlerFromEndpoint is same as RegisterAuthzServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAuthzServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterAuthzServiceHandler(ctx, mux, conn) -} - -// RegisterAuthzServiceHandler registers the http handlers for service AuthzService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterAuthzServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAuthzServiceHandlerClient(ctx, mux, NewAuthzServiceClient(conn)) -} - -// RegisterAuthzServiceHandlerClient registers the http handlers for service AuthzService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthzServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthzServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AuthzServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterAuthzServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthzServiceClient) error { - - mux.Handle("GET", pattern_AuthzService_ListMyPermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.authz.v1.AuthzService/ListMyPermissions", runtime.WithHTTPPathPattern("/v1/users/me/permissions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthzService_ListMyPermissions_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthzService_ListMyPermissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_AuthzService_ListMyPermissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "users", "me", "permissions"}, "")) -) - -var ( - forward_AuthzService_ListMyPermissions_0 = runtime.ForwardResponseMessage -) diff --git a/gen/go/authorizer/authz/v1/authz_service_grpc.pb.go b/gen/go/authorizer/authz/v1/authz_service_grpc.pb.go deleted file mode 100644 index d22e08fe..00000000 --- a/gen/go/authorizer/authz/v1/authz_service_grpc.pb.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: authorizer/authz/v1/authz_service.proto - -package authzv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - AuthzService_ListMyPermissions_FullMethodName = "/authorizer.authz.v1.AuthzService/ListMyPermissions" -) - -// AuthzServiceClient is the client API for AuthzService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// AuthzService is the user-facing fine-grained-authorization surface. The -// admin CRUD on resources/scopes/policies/permissions remains GraphQL-only -// (dashboard consumer). -type AuthzServiceClient interface { - // ListMyPermissions returns every (resource, scope) pair the caller is - // allowed to act on, derived from their roles and the policy engine. - ListMyPermissions(ctx context.Context, in *ListMyPermissionsRequest, opts ...grpc.CallOption) (*ListMyPermissionsResponse, error) -} - -type authzServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAuthzServiceClient(cc grpc.ClientConnInterface) AuthzServiceClient { - return &authzServiceClient{cc} -} - -func (c *authzServiceClient) ListMyPermissions(ctx context.Context, in *ListMyPermissionsRequest, opts ...grpc.CallOption) (*ListMyPermissionsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListMyPermissionsResponse) - err := c.cc.Invoke(ctx, AuthzService_ListMyPermissions_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AuthzServiceServer is the server API for AuthzService service. -// All implementations should embed UnimplementedAuthzServiceServer -// for forward compatibility. -// -// AuthzService is the user-facing fine-grained-authorization surface. The -// admin CRUD on resources/scopes/policies/permissions remains GraphQL-only -// (dashboard consumer). -type AuthzServiceServer interface { - // ListMyPermissions returns every (resource, scope) pair the caller is - // allowed to act on, derived from their roles and the policy engine. - ListMyPermissions(context.Context, *ListMyPermissionsRequest) (*ListMyPermissionsResponse, error) -} - -// UnimplementedAuthzServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedAuthzServiceServer struct{} - -func (UnimplementedAuthzServiceServer) ListMyPermissions(context.Context, *ListMyPermissionsRequest) (*ListMyPermissionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListMyPermissions not implemented") -} -func (UnimplementedAuthzServiceServer) testEmbeddedByValue() {} - -// UnsafeAuthzServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AuthzServiceServer will -// result in compilation errors. -type UnsafeAuthzServiceServer interface { - mustEmbedUnimplementedAuthzServiceServer() -} - -func RegisterAuthzServiceServer(s grpc.ServiceRegistrar, srv AuthzServiceServer) { - // If the following call pancis, it indicates UnimplementedAuthzServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&AuthzService_ServiceDesc, srv) -} - -func _AuthzService_ListMyPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListMyPermissionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthzServiceServer).ListMyPermissions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AuthzService_ListMyPermissions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthzServiceServer).ListMyPermissions(ctx, req.(*ListMyPermissionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// AuthzService_ServiceDesc is the grpc.ServiceDesc for AuthzService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var AuthzService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.authz.v1.AuthzService", - HandlerType: (*AuthzServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListMyPermissions", - Handler: _AuthzService_ListMyPermissions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authorizer/authz/v1/authz_service.proto", -} diff --git a/gen/go/authorizer/meta/v1/meta_service.pb.go b/gen/go/authorizer/meta/v1/meta_service.pb.go deleted file mode 100644 index a5a9e4c3..00000000 --- a/gen/go/authorizer/meta/v1/meta_service.pb.go +++ /dev/null @@ -1,421 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/meta/v1/meta_service.proto - -package metav1 - -import ( - _ "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetMetaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetMetaRequest) Reset() { - *x = GetMetaRequest{} - mi := &file_authorizer_meta_v1_meta_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMetaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMetaRequest) ProtoMessage() {} - -func (x *GetMetaRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_meta_v1_meta_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMetaRequest.ProtoReflect.Descriptor instead. -func (*GetMetaRequest) Descriptor() ([]byte, []int) { - return file_authorizer_meta_v1_meta_service_proto_rawDescGZIP(), []int{0} -} - -// GetMetaResponse mirrors the GraphQL Meta type 1:1. Field naming uses the -// existing snake_case names so existing consumers see the same shape over -// REST. -type GetMetaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - IsGoogleLoginEnabled bool `protobuf:"varint,3,opt,name=is_google_login_enabled,json=isGoogleLoginEnabled,proto3" json:"is_google_login_enabled,omitempty"` - IsFacebookLoginEnabled bool `protobuf:"varint,4,opt,name=is_facebook_login_enabled,json=isFacebookLoginEnabled,proto3" json:"is_facebook_login_enabled,omitempty"` - IsGithubLoginEnabled bool `protobuf:"varint,5,opt,name=is_github_login_enabled,json=isGithubLoginEnabled,proto3" json:"is_github_login_enabled,omitempty"` - IsLinkedinLoginEnabled bool `protobuf:"varint,6,opt,name=is_linkedin_login_enabled,json=isLinkedinLoginEnabled,proto3" json:"is_linkedin_login_enabled,omitempty"` - IsAppleLoginEnabled bool `protobuf:"varint,7,opt,name=is_apple_login_enabled,json=isAppleLoginEnabled,proto3" json:"is_apple_login_enabled,omitempty"` - IsDiscordLoginEnabled bool `protobuf:"varint,8,opt,name=is_discord_login_enabled,json=isDiscordLoginEnabled,proto3" json:"is_discord_login_enabled,omitempty"` - IsTwitterLoginEnabled bool `protobuf:"varint,9,opt,name=is_twitter_login_enabled,json=isTwitterLoginEnabled,proto3" json:"is_twitter_login_enabled,omitempty"` - IsMicrosoftLoginEnabled bool `protobuf:"varint,10,opt,name=is_microsoft_login_enabled,json=isMicrosoftLoginEnabled,proto3" json:"is_microsoft_login_enabled,omitempty"` - IsTwitchLoginEnabled bool `protobuf:"varint,11,opt,name=is_twitch_login_enabled,json=isTwitchLoginEnabled,proto3" json:"is_twitch_login_enabled,omitempty"` - IsRobloxLoginEnabled bool `protobuf:"varint,12,opt,name=is_roblox_login_enabled,json=isRobloxLoginEnabled,proto3" json:"is_roblox_login_enabled,omitempty"` - IsEmailVerificationEnabled bool `protobuf:"varint,13,opt,name=is_email_verification_enabled,json=isEmailVerificationEnabled,proto3" json:"is_email_verification_enabled,omitempty"` - IsBasicAuthenticationEnabled bool `protobuf:"varint,14,opt,name=is_basic_authentication_enabled,json=isBasicAuthenticationEnabled,proto3" json:"is_basic_authentication_enabled,omitempty"` - IsMagicLinkLoginEnabled bool `protobuf:"varint,15,opt,name=is_magic_link_login_enabled,json=isMagicLinkLoginEnabled,proto3" json:"is_magic_link_login_enabled,omitempty"` - IsSignUpEnabled bool `protobuf:"varint,16,opt,name=is_sign_up_enabled,json=isSignUpEnabled,proto3" json:"is_sign_up_enabled,omitempty"` - IsStrongPasswordEnabled bool `protobuf:"varint,17,opt,name=is_strong_password_enabled,json=isStrongPasswordEnabled,proto3" json:"is_strong_password_enabled,omitempty"` - IsMultiFactorAuthEnabled bool `protobuf:"varint,18,opt,name=is_multi_factor_auth_enabled,json=isMultiFactorAuthEnabled,proto3" json:"is_multi_factor_auth_enabled,omitempty"` - IsMobileBasicAuthenticationEnabled bool `protobuf:"varint,19,opt,name=is_mobile_basic_authentication_enabled,json=isMobileBasicAuthenticationEnabled,proto3" json:"is_mobile_basic_authentication_enabled,omitempty"` - IsPhoneVerificationEnabled bool `protobuf:"varint,20,opt,name=is_phone_verification_enabled,json=isPhoneVerificationEnabled,proto3" json:"is_phone_verification_enabled,omitempty"` -} - -func (x *GetMetaResponse) Reset() { - *x = GetMetaResponse{} - mi := &file_authorizer_meta_v1_meta_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMetaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMetaResponse) ProtoMessage() {} - -func (x *GetMetaResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_meta_v1_meta_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMetaResponse.ProtoReflect.Descriptor instead. -func (*GetMetaResponse) Descriptor() ([]byte, []int) { - return file_authorizer_meta_v1_meta_service_proto_rawDescGZIP(), []int{1} -} - -func (x *GetMetaResponse) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *GetMetaResponse) GetClientId() string { - if x != nil { - return x.ClientId - } - return "" -} - -func (x *GetMetaResponse) GetIsGoogleLoginEnabled() bool { - if x != nil { - return x.IsGoogleLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsFacebookLoginEnabled() bool { - if x != nil { - return x.IsFacebookLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsGithubLoginEnabled() bool { - if x != nil { - return x.IsGithubLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsLinkedinLoginEnabled() bool { - if x != nil { - return x.IsLinkedinLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsAppleLoginEnabled() bool { - if x != nil { - return x.IsAppleLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsDiscordLoginEnabled() bool { - if x != nil { - return x.IsDiscordLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsTwitterLoginEnabled() bool { - if x != nil { - return x.IsTwitterLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsMicrosoftLoginEnabled() bool { - if x != nil { - return x.IsMicrosoftLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsTwitchLoginEnabled() bool { - if x != nil { - return x.IsTwitchLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsRobloxLoginEnabled() bool { - if x != nil { - return x.IsRobloxLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsEmailVerificationEnabled() bool { - if x != nil { - return x.IsEmailVerificationEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsBasicAuthenticationEnabled() bool { - if x != nil { - return x.IsBasicAuthenticationEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsMagicLinkLoginEnabled() bool { - if x != nil { - return x.IsMagicLinkLoginEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsSignUpEnabled() bool { - if x != nil { - return x.IsSignUpEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsStrongPasswordEnabled() bool { - if x != nil { - return x.IsStrongPasswordEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsMultiFactorAuthEnabled() bool { - if x != nil { - return x.IsMultiFactorAuthEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsMobileBasicAuthenticationEnabled() bool { - if x != nil { - return x.IsMobileBasicAuthenticationEnabled - } - return false -} - -func (x *GetMetaResponse) GetIsPhoneVerificationEnabled() bool { - if x != nil { - return x.IsPhoneVerificationEnabled - } - return false -} - -var File_authorizer_meta_v1_meta_service_proto protoreflect.FileDescriptor - -var file_authorizer_meta_v1_meta_service_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x74, - 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x87, 0x09, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x35, - 0x0a, 0x17, 0x69, 0x73, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x6c, 0x6f, 0x67, 0x69, - 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x14, 0x69, 0x73, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x19, 0x69, 0x73, 0x5f, 0x66, 0x61, 0x63, 0x65, - 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x46, 0x61, 0x63, 0x65, - 0x62, 0x6f, 0x6f, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x35, 0x0a, 0x17, 0x69, 0x73, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x6c, 0x6f, - 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x14, 0x69, 0x73, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x4c, 0x6f, 0x67, 0x69, 0x6e, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x19, 0x69, 0x73, 0x5f, 0x6c, 0x69, - 0x6e, 0x6b, 0x65, 0x64, 0x69, 0x6e, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x4c, 0x69, - 0x6e, 0x6b, 0x65, 0x64, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x69, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x5f, 0x6c, - 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x74, 0x77, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x6c, - 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x54, 0x77, 0x69, 0x74, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x73, 0x5f, - 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x69, - 0x73, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x69, 0x73, 0x5f, 0x74, 0x77, 0x69, - 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x73, 0x54, 0x77, 0x69, 0x74, 0x63, - 0x68, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x35, 0x0a, - 0x17, 0x69, 0x73, 0x5f, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, - 0x69, 0x73, 0x52, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x73, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x73, 0x45, - 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x69, 0x73, 0x5f, 0x62, 0x61, - 0x73, 0x69, 0x63, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1c, 0x69, 0x73, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3c, - 0x0a, 0x1b, 0x69, 0x73, 0x5f, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, - 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x17, 0x69, 0x73, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, - 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x12, - 0x69, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x75, 0x70, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x53, 0x69, 0x67, 0x6e, - 0x55, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x73, 0x5f, - 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x69, - 0x73, 0x53, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x1c, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x69, 0x73, - 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x75, 0x74, 0x68, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x52, 0x0a, 0x26, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x62, - 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x69, 0x73, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, - 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x73, - 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x1a, 0x69, 0x73, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x32, 0x7d, 0x0a, - 0x0b, 0x4d, 0x65, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1a, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x42, 0xda, 0x01, 0x0a, - 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, - 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x4d, 0x65, 0x74, 0x61, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x41, 0x4d, 0x58, 0xaa, 0x02, 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x4d, 0x65, 0x74, 0x61, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x4d, - 0x65, 0x74, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, - 0x3a, 0x4d, 0x65, 0x74, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_authorizer_meta_v1_meta_service_proto_rawDescOnce sync.Once - file_authorizer_meta_v1_meta_service_proto_rawDescData = file_authorizer_meta_v1_meta_service_proto_rawDesc -) - -func file_authorizer_meta_v1_meta_service_proto_rawDescGZIP() []byte { - file_authorizer_meta_v1_meta_service_proto_rawDescOnce.Do(func() { - file_authorizer_meta_v1_meta_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_meta_v1_meta_service_proto_rawDescData) - }) - return file_authorizer_meta_v1_meta_service_proto_rawDescData -} - -var file_authorizer_meta_v1_meta_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authorizer_meta_v1_meta_service_proto_goTypes = []any{ - (*GetMetaRequest)(nil), // 0: authorizer.meta.v1.GetMetaRequest - (*GetMetaResponse)(nil), // 1: authorizer.meta.v1.GetMetaResponse -} -var file_authorizer_meta_v1_meta_service_proto_depIdxs = []int32{ - 0, // 0: authorizer.meta.v1.MetaService.GetMeta:input_type -> authorizer.meta.v1.GetMetaRequest - 1, // 1: authorizer.meta.v1.MetaService.GetMeta:output_type -> authorizer.meta.v1.GetMetaResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_authorizer_meta_v1_meta_service_proto_init() } -func file_authorizer_meta_v1_meta_service_proto_init() { - if File_authorizer_meta_v1_meta_service_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_meta_v1_meta_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_authorizer_meta_v1_meta_service_proto_goTypes, - DependencyIndexes: file_authorizer_meta_v1_meta_service_proto_depIdxs, - MessageInfos: file_authorizer_meta_v1_meta_service_proto_msgTypes, - }.Build() - File_authorizer_meta_v1_meta_service_proto = out.File - file_authorizer_meta_v1_meta_service_proto_rawDesc = nil - file_authorizer_meta_v1_meta_service_proto_goTypes = nil - file_authorizer_meta_v1_meta_service_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/meta/v1/meta_service.pb.gw.go b/gen/go/authorizer/meta/v1/meta_service.pb.gw.go deleted file mode 100644 index a03e76a0..00000000 --- a/gen/go/authorizer/meta/v1/meta_service.pb.gw.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: authorizer/meta/v1/meta_service.proto - -/* -Package metav1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package metav1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_MetaService_GetMeta_0(ctx context.Context, marshaler runtime.Marshaler, client MetaServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMetaRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetMeta(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_MetaService_GetMeta_0(ctx context.Context, marshaler runtime.Marshaler, server MetaServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetMetaRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetMeta(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterMetaServiceHandlerServer registers the http handlers for service MetaService to "mux". -// UnaryRPC :call MetaServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMetaServiceHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterMetaServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MetaServiceServer) error { - - mux.Handle("GET", pattern_MetaService_GetMeta_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.meta.v1.MetaService/GetMeta", runtime.WithHTTPPathPattern("/v1/meta")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MetaService_GetMeta_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_MetaService_GetMeta_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterMetaServiceHandlerFromEndpoint is same as RegisterMetaServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterMetaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterMetaServiceHandler(ctx, mux, conn) -} - -// RegisterMetaServiceHandler registers the http handlers for service MetaService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterMetaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterMetaServiceHandlerClient(ctx, mux, NewMetaServiceClient(conn)) -} - -// RegisterMetaServiceHandlerClient registers the http handlers for service MetaService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MetaServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MetaServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "MetaServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterMetaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetaServiceClient) error { - - mux.Handle("GET", pattern_MetaService_GetMeta_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.meta.v1.MetaService/GetMeta", runtime.WithHTTPPathPattern("/v1/meta")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_MetaService_GetMeta_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_MetaService_GetMeta_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_MetaService_GetMeta_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "meta"}, "")) -) - -var ( - forward_MetaService_GetMeta_0 = runtime.ForwardResponseMessage -) diff --git a/gen/go/authorizer/meta/v1/meta_service_grpc.pb.go b/gen/go/authorizer/meta/v1/meta_service_grpc.pb.go deleted file mode 100644 index 8caef485..00000000 --- a/gen/go/authorizer/meta/v1/meta_service_grpc.pb.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: authorizer/meta/v1/meta_service.proto - -package metav1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - MetaService_GetMeta_FullMethodName = "/authorizer.meta.v1.MetaService/GetMeta" -) - -// MetaServiceClient is the client API for MetaService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// MetaService exposes server-discovery information. All methods are public. -type MetaServiceClient interface { - // GetMeta returns the server's feature-flag and provider configuration. - // Used by SPAs to decide which login UIs to render. - GetMeta(ctx context.Context, in *GetMetaRequest, opts ...grpc.CallOption) (*GetMetaResponse, error) -} - -type metaServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewMetaServiceClient(cc grpc.ClientConnInterface) MetaServiceClient { - return &metaServiceClient{cc} -} - -func (c *metaServiceClient) GetMeta(ctx context.Context, in *GetMetaRequest, opts ...grpc.CallOption) (*GetMetaResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetMetaResponse) - err := c.cc.Invoke(ctx, MetaService_GetMeta_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MetaServiceServer is the server API for MetaService service. -// All implementations should embed UnimplementedMetaServiceServer -// for forward compatibility. -// -// MetaService exposes server-discovery information. All methods are public. -type MetaServiceServer interface { - // GetMeta returns the server's feature-flag and provider configuration. - // Used by SPAs to decide which login UIs to render. - GetMeta(context.Context, *GetMetaRequest) (*GetMetaResponse, error) -} - -// UnimplementedMetaServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMetaServiceServer struct{} - -func (UnimplementedMetaServiceServer) GetMeta(context.Context, *GetMetaRequest) (*GetMetaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented") -} -func (UnimplementedMetaServiceServer) testEmbeddedByValue() {} - -// UnsafeMetaServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MetaServiceServer will -// result in compilation errors. -type UnsafeMetaServiceServer interface { - mustEmbedUnimplementedMetaServiceServer() -} - -func RegisterMetaServiceServer(s grpc.ServiceRegistrar, srv MetaServiceServer) { - // If the following call pancis, it indicates UnimplementedMetaServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&MetaService_ServiceDesc, srv) -} - -func _MetaService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetMetaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetaServiceServer).GetMeta(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MetaService_GetMeta_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetaServiceServer).GetMeta(ctx, req.(*GetMetaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// MetaService_ServiceDesc is the grpc.ServiceDesc for MetaService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var MetaService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.meta.v1.MetaService", - HandlerType: (*MetaServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetMeta", - Handler: _MetaService_GetMeta_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authorizer/meta/v1/meta_service.proto", -} diff --git a/gen/go/authorizer/session/v1/magic_link_service.pb.go b/gen/go/authorizer/session/v1/magic_link_service.pb.go deleted file mode 100644 index 433976b8..00000000 --- a/gen/go/authorizer/session/v1/magic_link_service.pb.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/session/v1/magic_link_service.proto - -package sessionv1 - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - _ "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateMagicLinkRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - Roles []string `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` - Scope []string `protobuf:"bytes,3,rep,name=scope,proto3" json:"scope,omitempty"` - State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` - RedirectUri string `protobuf:"bytes,5,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` -} - -func (x *CreateMagicLinkRequest) Reset() { - *x = CreateMagicLinkRequest{} - mi := &file_authorizer_session_v1_magic_link_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateMagicLinkRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateMagicLinkRequest) ProtoMessage() {} - -func (x *CreateMagicLinkRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_magic_link_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateMagicLinkRequest.ProtoReflect.Descriptor instead. -func (*CreateMagicLinkRequest) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_magic_link_service_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateMagicLinkRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *CreateMagicLinkRequest) GetRoles() []string { - if x != nil { - return x.Roles - } - return nil -} - -func (x *CreateMagicLinkRequest) GetScope() []string { - if x != nil { - return x.Scope - } - return nil -} - -func (x *CreateMagicLinkRequest) GetState() string { - if x != nil { - return x.State - } - return "" -} - -func (x *CreateMagicLinkRequest) GetRedirectUri() string { - if x != nil { - return x.RedirectUri - } - return "" -} - -type CreateMagicLinkResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *CreateMagicLinkResponse) Reset() { - *x = CreateMagicLinkResponse{} - mi := &file_authorizer_session_v1_magic_link_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateMagicLinkResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateMagicLinkResponse) ProtoMessage() {} - -func (x *CreateMagicLinkResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_magic_link_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateMagicLinkResponse.ProtoReflect.Descriptor instead. -func (*CreateMagicLinkResponse) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_magic_link_service_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateMagicLinkResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_authorizer_session_v1_magic_link_service_proto protoreflect.FileDescriptor - -var file_authorizer_session_v1_magic_link_service_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6c, 0x69, - 0x6e, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x01, 0x0a, 0x16, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x18, 0xc0, 0x02, 0x60, 0x01, - 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, 0x22, 0x33, 0x0a, 0x17, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x32, 0xa9, 0x01, 0x0a, 0x10, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2d, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, - 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x98, 0xb5, 0x18, 0x01, 0xa0, - 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, - 0x31, 0x2f, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x2d, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x42, 0xf4, 0x01, - 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x4d, 0x61, 0x67, - 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x41, 0x53, 0x58, 0xaa, 0x02, 0x15, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x15, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x21, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x5c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_session_v1_magic_link_service_proto_rawDescOnce sync.Once - file_authorizer_session_v1_magic_link_service_proto_rawDescData = file_authorizer_session_v1_magic_link_service_proto_rawDesc -) - -func file_authorizer_session_v1_magic_link_service_proto_rawDescGZIP() []byte { - file_authorizer_session_v1_magic_link_service_proto_rawDescOnce.Do(func() { - file_authorizer_session_v1_magic_link_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_session_v1_magic_link_service_proto_rawDescData) - }) - return file_authorizer_session_v1_magic_link_service_proto_rawDescData -} - -var file_authorizer_session_v1_magic_link_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authorizer_session_v1_magic_link_service_proto_goTypes = []any{ - (*CreateMagicLinkRequest)(nil), // 0: authorizer.session.v1.CreateMagicLinkRequest - (*CreateMagicLinkResponse)(nil), // 1: authorizer.session.v1.CreateMagicLinkResponse -} -var file_authorizer_session_v1_magic_link_service_proto_depIdxs = []int32{ - 0, // 0: authorizer.session.v1.MagicLinkService.CreateMagicLink:input_type -> authorizer.session.v1.CreateMagicLinkRequest - 1, // 1: authorizer.session.v1.MagicLinkService.CreateMagicLink:output_type -> authorizer.session.v1.CreateMagicLinkResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_authorizer_session_v1_magic_link_service_proto_init() } -func file_authorizer_session_v1_magic_link_service_proto_init() { - if File_authorizer_session_v1_magic_link_service_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_session_v1_magic_link_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_authorizer_session_v1_magic_link_service_proto_goTypes, - DependencyIndexes: file_authorizer_session_v1_magic_link_service_proto_depIdxs, - MessageInfos: file_authorizer_session_v1_magic_link_service_proto_msgTypes, - }.Build() - File_authorizer_session_v1_magic_link_service_proto = out.File - file_authorizer_session_v1_magic_link_service_proto_rawDesc = nil - file_authorizer_session_v1_magic_link_service_proto_goTypes = nil - file_authorizer_session_v1_magic_link_service_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/session/v1/magic_link_service.pb.gw.go b/gen/go/authorizer/session/v1/magic_link_service.pb.gw.go deleted file mode 100644 index 79c3c642..00000000 --- a/gen/go/authorizer/session/v1/magic_link_service.pb.gw.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: authorizer/session/v1/magic_link_service.proto - -/* -Package sessionv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package sessionv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_MagicLinkService_CreateMagicLink_0(ctx context.Context, marshaler runtime.Marshaler, client MagicLinkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateMagicLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateMagicLink(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_MagicLinkService_CreateMagicLink_0(ctx context.Context, marshaler runtime.Marshaler, server MagicLinkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateMagicLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateMagicLink(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterMagicLinkServiceHandlerServer registers the http handlers for service MagicLinkService to "mux". -// UnaryRPC :call MagicLinkServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMagicLinkServiceHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterMagicLinkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MagicLinkServiceServer) error { - - mux.Handle("POST", pattern_MagicLinkService_CreateMagicLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.session.v1.MagicLinkService/CreateMagicLink", runtime.WithHTTPPathPattern("/v1/magic-links")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MagicLinkService_CreateMagicLink_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_MagicLinkService_CreateMagicLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterMagicLinkServiceHandlerFromEndpoint is same as RegisterMagicLinkServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterMagicLinkServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterMagicLinkServiceHandler(ctx, mux, conn) -} - -// RegisterMagicLinkServiceHandler registers the http handlers for service MagicLinkService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterMagicLinkServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterMagicLinkServiceHandlerClient(ctx, mux, NewMagicLinkServiceClient(conn)) -} - -// RegisterMagicLinkServiceHandlerClient registers the http handlers for service MagicLinkService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MagicLinkServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MagicLinkServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "MagicLinkServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterMagicLinkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MagicLinkServiceClient) error { - - mux.Handle("POST", pattern_MagicLinkService_CreateMagicLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.session.v1.MagicLinkService/CreateMagicLink", runtime.WithHTTPPathPattern("/v1/magic-links")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_MagicLinkService_CreateMagicLink_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_MagicLinkService_CreateMagicLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_MagicLinkService_CreateMagicLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "magic-links"}, "")) -) - -var ( - forward_MagicLinkService_CreateMagicLink_0 = runtime.ForwardResponseMessage -) diff --git a/gen/go/authorizer/session/v1/magic_link_service_grpc.pb.go b/gen/go/authorizer/session/v1/magic_link_service_grpc.pb.go deleted file mode 100644 index 90facf6a..00000000 --- a/gen/go/authorizer/session/v1/magic_link_service_grpc.pb.go +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: authorizer/session/v1/magic_link_service.proto - -package sessionv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - MagicLinkService_CreateMagicLink_FullMethodName = "/authorizer.session.v1.MagicLinkService/CreateMagicLink" -) - -// MagicLinkServiceClient is the client API for MagicLinkService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// MagicLinkService models passwordless email-link login as the "magic link" -// resource. CreateMagicLink dispatches an email; the user clicks the link -// (handled by the existing /verify_email browser route), which results in a -// new Session via CreateSession with grant.magic_link. -type MagicLinkServiceClient interface { - // CreateMagicLink dispatches a magic-link email. Returns 202: the email - // is sent asynchronously; the link itself drives session creation later. - CreateMagicLink(ctx context.Context, in *CreateMagicLinkRequest, opts ...grpc.CallOption) (*CreateMagicLinkResponse, error) -} - -type magicLinkServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewMagicLinkServiceClient(cc grpc.ClientConnInterface) MagicLinkServiceClient { - return &magicLinkServiceClient{cc} -} - -func (c *magicLinkServiceClient) CreateMagicLink(ctx context.Context, in *CreateMagicLinkRequest, opts ...grpc.CallOption) (*CreateMagicLinkResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateMagicLinkResponse) - err := c.cc.Invoke(ctx, MagicLinkService_CreateMagicLink_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MagicLinkServiceServer is the server API for MagicLinkService service. -// All implementations should embed UnimplementedMagicLinkServiceServer -// for forward compatibility. -// -// MagicLinkService models passwordless email-link login as the "magic link" -// resource. CreateMagicLink dispatches an email; the user clicks the link -// (handled by the existing /verify_email browser route), which results in a -// new Session via CreateSession with grant.magic_link. -type MagicLinkServiceServer interface { - // CreateMagicLink dispatches a magic-link email. Returns 202: the email - // is sent asynchronously; the link itself drives session creation later. - CreateMagicLink(context.Context, *CreateMagicLinkRequest) (*CreateMagicLinkResponse, error) -} - -// UnimplementedMagicLinkServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMagicLinkServiceServer struct{} - -func (UnimplementedMagicLinkServiceServer) CreateMagicLink(context.Context, *CreateMagicLinkRequest) (*CreateMagicLinkResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateMagicLink not implemented") -} -func (UnimplementedMagicLinkServiceServer) testEmbeddedByValue() {} - -// UnsafeMagicLinkServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MagicLinkServiceServer will -// result in compilation errors. -type UnsafeMagicLinkServiceServer interface { - mustEmbedUnimplementedMagicLinkServiceServer() -} - -func RegisterMagicLinkServiceServer(s grpc.ServiceRegistrar, srv MagicLinkServiceServer) { - // If the following call pancis, it indicates UnimplementedMagicLinkServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&MagicLinkService_ServiceDesc, srv) -} - -func _MagicLinkService_CreateMagicLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateMagicLinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MagicLinkServiceServer).CreateMagicLink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MagicLinkService_CreateMagicLink_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MagicLinkServiceServer).CreateMagicLink(ctx, req.(*CreateMagicLinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// MagicLinkService_ServiceDesc is the grpc.ServiceDesc for MagicLinkService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var MagicLinkService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.session.v1.MagicLinkService", - HandlerType: (*MagicLinkServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateMagicLink", - Handler: _MagicLinkService_CreateMagicLink_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authorizer/session/v1/magic_link_service.proto", -} diff --git a/gen/go/authorizer/session/v1/session.pb.go b/gen/go/authorizer/session/v1/session.pb.go deleted file mode 100644 index 8b73e9db..00000000 --- a/gen/go/authorizer/session/v1/session.pb.go +++ /dev/null @@ -1,335 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/session/v1/session.proto - -package sessionv1 - -import ( - v1 "github.com/authorizerdev/authorizer/gen/go/authorizer/user/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Session is what CreateSession returns: tokens plus enough user context to -// avoid a follow-up GetUser. Mirrors the GraphQL AuthResponse type 1:1 in -// field naming. -type Session struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - ShouldShowEmailOtpScreen bool `protobuf:"varint,2,opt,name=should_show_email_otp_screen,json=shouldShowEmailOtpScreen,proto3" json:"should_show_email_otp_screen,omitempty"` - ShouldShowMobileOtpScreen bool `protobuf:"varint,3,opt,name=should_show_mobile_otp_screen,json=shouldShowMobileOtpScreen,proto3" json:"should_show_mobile_otp_screen,omitempty"` - ShouldShowTotpScreen bool `protobuf:"varint,4,opt,name=should_show_totp_screen,json=shouldShowTotpScreen,proto3" json:"should_show_totp_screen,omitempty"` - AccessToken string `protobuf:"bytes,5,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` - IdToken string `protobuf:"bytes,6,opt,name=id_token,json=idToken,proto3" json:"id_token,omitempty"` - RefreshToken string `protobuf:"bytes,7,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` - ExpiresIn int64 `protobuf:"varint,8,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` - User *v1.User `protobuf:"bytes,9,opt,name=user,proto3" json:"user,omitempty"` - // TOTP enrolment artifacts (set only when CreateSession initiates TOTP setup). - AuthenticatorScannerImage string `protobuf:"bytes,10,opt,name=authenticator_scanner_image,json=authenticatorScannerImage,proto3" json:"authenticator_scanner_image,omitempty"` - AuthenticatorSecret string `protobuf:"bytes,11,opt,name=authenticator_secret,json=authenticatorSecret,proto3" json:"authenticator_secret,omitempty"` - AuthenticatorRecoveryCodes []string `protobuf:"bytes,12,rep,name=authenticator_recovery_codes,json=authenticatorRecoveryCodes,proto3" json:"authenticator_recovery_codes,omitempty"` -} - -func (x *Session) Reset() { - *x = Session{} - mi := &file_authorizer_session_v1_session_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Session) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Session) ProtoMessage() {} - -func (x *Session) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Session.ProtoReflect.Descriptor instead. -func (*Session) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_proto_rawDescGZIP(), []int{0} -} - -func (x *Session) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *Session) GetShouldShowEmailOtpScreen() bool { - if x != nil { - return x.ShouldShowEmailOtpScreen - } - return false -} - -func (x *Session) GetShouldShowMobileOtpScreen() bool { - if x != nil { - return x.ShouldShowMobileOtpScreen - } - return false -} - -func (x *Session) GetShouldShowTotpScreen() bool { - if x != nil { - return x.ShouldShowTotpScreen - } - return false -} - -func (x *Session) GetAccessToken() string { - if x != nil { - return x.AccessToken - } - return "" -} - -func (x *Session) GetIdToken() string { - if x != nil { - return x.IdToken - } - return "" -} - -func (x *Session) GetRefreshToken() string { - if x != nil { - return x.RefreshToken - } - return "" -} - -func (x *Session) GetExpiresIn() int64 { - if x != nil { - return x.ExpiresIn - } - return 0 -} - -func (x *Session) GetUser() *v1.User { - if x != nil { - return x.User - } - return nil -} - -func (x *Session) GetAuthenticatorScannerImage() string { - if x != nil { - return x.AuthenticatorScannerImage - } - return "" -} - -func (x *Session) GetAuthenticatorSecret() string { - if x != nil { - return x.AuthenticatorSecret - } - return "" -} - -func (x *Session) GetAuthenticatorRecoveryCodes() []string { - if x != nil { - return x.AuthenticatorRecoveryCodes - } - return nil -} - -// SessionValidationResult is what CreateSessionValidation returns. -type SessionValidationResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` - User *v1.User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *SessionValidationResult) Reset() { - *x = SessionValidationResult{} - mi := &file_authorizer_session_v1_session_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionValidationResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionValidationResult) ProtoMessage() {} - -func (x *SessionValidationResult) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionValidationResult.ProtoReflect.Descriptor instead. -func (*SessionValidationResult) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_proto_rawDescGZIP(), []int{1} -} - -func (x *SessionValidationResult) GetIsValid() bool { - if x != nil { - return x.IsValid - } - return false -} - -func (x *SessionValidationResult) GetUser() *v1.User { - if x != nil { - return x.User - } - return nil -} - -var File_authorizer_session_v1_session_proto protoreflect.FileDescriptor - -var file_authorizer_session_v1_session_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1d, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x04, 0x0a, 0x07, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x3e, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, 0x68, 0x6f, 0x77, - 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x6f, 0x74, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x65, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x53, - 0x68, 0x6f, 0x77, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4f, 0x74, 0x70, 0x53, 0x63, 0x72, 0x65, 0x65, - 0x6e, 0x12, 0x40, 0x0a, 0x1d, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, 0x68, 0x6f, 0x77, - 0x5f, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x5f, 0x6f, 0x74, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x65, - 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, - 0x53, 0x68, 0x6f, 0x77, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4f, 0x74, 0x70, 0x53, 0x63, 0x72, - 0x65, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x17, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, 0x68, - 0x6f, 0x77, 0x5f, 0x74, 0x6f, 0x74, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x77, - 0x54, 0x6f, 0x74, 0x70, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x19, 0x0a, - 0x08, 0x69, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, - 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, 0x12, 0x2c, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x1b, 0x61, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x61, 0x6e, - 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x19, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x63, - 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x61, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x40, 0x0a, - 0x1c, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, - 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0c, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x1a, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x22, - 0x62, 0x0a, 0x17, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x42, 0xeb, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x42, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x41, 0x53, 0x58, 0xaa, 0x02, 0x15, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x21, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x5c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_session_v1_session_proto_rawDescOnce sync.Once - file_authorizer_session_v1_session_proto_rawDescData = file_authorizer_session_v1_session_proto_rawDesc -) - -func file_authorizer_session_v1_session_proto_rawDescGZIP() []byte { - file_authorizer_session_v1_session_proto_rawDescOnce.Do(func() { - file_authorizer_session_v1_session_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_session_v1_session_proto_rawDescData) - }) - return file_authorizer_session_v1_session_proto_rawDescData -} - -var file_authorizer_session_v1_session_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authorizer_session_v1_session_proto_goTypes = []any{ - (*Session)(nil), // 0: authorizer.session.v1.Session - (*SessionValidationResult)(nil), // 1: authorizer.session.v1.SessionValidationResult - (*v1.User)(nil), // 2: authorizer.user.v1.User -} -var file_authorizer_session_v1_session_proto_depIdxs = []int32{ - 2, // 0: authorizer.session.v1.Session.user:type_name -> authorizer.user.v1.User - 2, // 1: authorizer.session.v1.SessionValidationResult.user:type_name -> authorizer.user.v1.User - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_authorizer_session_v1_session_proto_init() } -func file_authorizer_session_v1_session_proto_init() { - if File_authorizer_session_v1_session_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_session_v1_session_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_authorizer_session_v1_session_proto_goTypes, - DependencyIndexes: file_authorizer_session_v1_session_proto_depIdxs, - MessageInfos: file_authorizer_session_v1_session_proto_msgTypes, - }.Build() - File_authorizer_session_v1_session_proto = out.File - file_authorizer_session_v1_session_proto_rawDesc = nil - file_authorizer_session_v1_session_proto_goTypes = nil - file_authorizer_session_v1_session_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/session/v1/session_service.pb.go b/gen/go/authorizer/session/v1/session_service.pb.go deleted file mode 100644 index 9de7e6b0..00000000 --- a/gen/go/authorizer/session/v1/session_service.pb.go +++ /dev/null @@ -1,1029 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/session/v1/session_service.proto - -package sessionv1 - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - _ "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateSessionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Grant: - // - // *CreateSessionRequest_Password - // *CreateSessionRequest_Otp - // *CreateSessionRequest_MagicLink - // *CreateSessionRequest_RefreshToken - Grant isCreateSessionRequest_Grant `protobuf_oneof:"grant"` - Roles []string `protobuf:"bytes,10,rep,name=roles,proto3" json:"roles,omitempty"` - Scope []string `protobuf:"bytes,11,rep,name=scope,proto3" json:"scope,omitempty"` - // OAuth2 authorization-code flow state echoed back via c_hash. - State string `protobuf:"bytes,12,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *CreateSessionRequest) Reset() { - *x = CreateSessionRequest{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSessionRequest) ProtoMessage() {} - -func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead. -func (*CreateSessionRequest) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{0} -} - -func (m *CreateSessionRequest) GetGrant() isCreateSessionRequest_Grant { - if m != nil { - return m.Grant - } - return nil -} - -func (x *CreateSessionRequest) GetPassword() *PasswordGrant { - if x, ok := x.GetGrant().(*CreateSessionRequest_Password); ok { - return x.Password - } - return nil -} - -func (x *CreateSessionRequest) GetOtp() *OtpGrant { - if x, ok := x.GetGrant().(*CreateSessionRequest_Otp); ok { - return x.Otp - } - return nil -} - -func (x *CreateSessionRequest) GetMagicLink() *MagicLinkGrant { - if x, ok := x.GetGrant().(*CreateSessionRequest_MagicLink); ok { - return x.MagicLink - } - return nil -} - -func (x *CreateSessionRequest) GetRefreshToken() *RefreshTokenGrant { - if x, ok := x.GetGrant().(*CreateSessionRequest_RefreshToken); ok { - return x.RefreshToken - } - return nil -} - -func (x *CreateSessionRequest) GetRoles() []string { - if x != nil { - return x.Roles - } - return nil -} - -func (x *CreateSessionRequest) GetScope() []string { - if x != nil { - return x.Scope - } - return nil -} - -func (x *CreateSessionRequest) GetState() string { - if x != nil { - return x.State - } - return "" -} - -type isCreateSessionRequest_Grant interface { - isCreateSessionRequest_Grant() -} - -type CreateSessionRequest_Password struct { - Password *PasswordGrant `protobuf:"bytes,1,opt,name=password,proto3,oneof"` -} - -type CreateSessionRequest_Otp struct { - Otp *OtpGrant `protobuf:"bytes,2,opt,name=otp,proto3,oneof"` -} - -type CreateSessionRequest_MagicLink struct { - MagicLink *MagicLinkGrant `protobuf:"bytes,3,opt,name=magic_link,json=magicLink,proto3,oneof"` -} - -type CreateSessionRequest_RefreshToken struct { - RefreshToken *RefreshTokenGrant `protobuf:"bytes,4,opt,name=refresh_token,json=refreshToken,proto3,oneof"` -} - -func (*CreateSessionRequest_Password) isCreateSessionRequest_Grant() {} - -func (*CreateSessionRequest_Otp) isCreateSessionRequest_Grant() {} - -func (*CreateSessionRequest_MagicLink) isCreateSessionRequest_Grant() {} - -func (*CreateSessionRequest_RefreshToken) isCreateSessionRequest_Grant() {} - -type PasswordGrant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Exactly one of email / phone_number is required. - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` -} - -func (x *PasswordGrant) Reset() { - *x = PasswordGrant{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PasswordGrant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PasswordGrant) ProtoMessage() {} - -func (x *PasswordGrant) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PasswordGrant.ProtoReflect.Descriptor instead. -func (*PasswordGrant) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{1} -} - -func (x *PasswordGrant) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *PasswordGrant) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *PasswordGrant) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -type OtpGrant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - Otp string `protobuf:"bytes,3,opt,name=otp,proto3" json:"otp,omitempty"` - IsTotp bool `protobuf:"varint,4,opt,name=is_totp,json=isTotp,proto3" json:"is_totp,omitempty"` -} - -func (x *OtpGrant) Reset() { - *x = OtpGrant{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OtpGrant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OtpGrant) ProtoMessage() {} - -func (x *OtpGrant) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OtpGrant.ProtoReflect.Descriptor instead. -func (*OtpGrant) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{2} -} - -func (x *OtpGrant) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *OtpGrant) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *OtpGrant) GetOtp() string { - if x != nil { - return x.Otp - } - return "" -} - -func (x *OtpGrant) GetIsTotp() bool { - if x != nil { - return x.IsTotp - } - return false -} - -type MagicLinkGrant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The token from the magic-link email URL. - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *MagicLinkGrant) Reset() { - *x = MagicLinkGrant{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MagicLinkGrant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MagicLinkGrant) ProtoMessage() {} - -func (x *MagicLinkGrant) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MagicLinkGrant.ProtoReflect.Descriptor instead. -func (*MagicLinkGrant) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{3} -} - -func (x *MagicLinkGrant) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type RefreshTokenGrant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` -} - -func (x *RefreshTokenGrant) Reset() { - *x = RefreshTokenGrant{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RefreshTokenGrant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RefreshTokenGrant) ProtoMessage() {} - -func (x *RefreshTokenGrant) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RefreshTokenGrant.ProtoReflect.Descriptor instead. -func (*RefreshTokenGrant) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{4} -} - -func (x *RefreshTokenGrant) GetRefreshToken() string { - if x != nil { - return x.RefreshToken - } - return "" -} - -type GetCurrentSessionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional permission filter: deny the request unless the caller holds - // every (resource, scope) pair listed. Matches GraphQL - // SessionQueryRequest.required_permissions. - RequiredPermissions []*PermissionRef `protobuf:"bytes,1,rep,name=required_permissions,json=requiredPermissions,proto3" json:"required_permissions,omitempty"` - Roles []string `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` - Scope []string `protobuf:"bytes,3,rep,name=scope,proto3" json:"scope,omitempty"` - State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *GetCurrentSessionRequest) Reset() { - *x = GetCurrentSessionRequest{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCurrentSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCurrentSessionRequest) ProtoMessage() {} - -func (x *GetCurrentSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCurrentSessionRequest.ProtoReflect.Descriptor instead. -func (*GetCurrentSessionRequest) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{5} -} - -func (x *GetCurrentSessionRequest) GetRequiredPermissions() []*PermissionRef { - if x != nil { - return x.RequiredPermissions - } - return nil -} - -func (x *GetCurrentSessionRequest) GetRoles() []string { - if x != nil { - return x.Roles - } - return nil -} - -func (x *GetCurrentSessionRequest) GetScope() []string { - if x != nil { - return x.Scope - } - return nil -} - -func (x *GetCurrentSessionRequest) GetState() string { - if x != nil { - return x.State - } - return "" -} - -type PermissionRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` -} - -func (x *PermissionRef) Reset() { - *x = PermissionRef{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PermissionRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PermissionRef) ProtoMessage() {} - -func (x *PermissionRef) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PermissionRef.ProtoReflect.Descriptor instead. -func (*PermissionRef) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{6} -} - -func (x *PermissionRef) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *PermissionRef) GetScope() string { - if x != nil { - return x.Scope - } - return "" -} - -type CreateSessionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` -} - -func (x *CreateSessionResponse) Reset() { - *x = CreateSessionResponse{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSessionResponse) ProtoMessage() {} - -func (x *CreateSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSessionResponse.ProtoReflect.Descriptor instead. -func (*CreateSessionResponse) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{7} -} - -func (x *CreateSessionResponse) GetSession() *Session { - if x != nil { - return x.Session - } - return nil -} - -type GetCurrentSessionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` -} - -func (x *GetCurrentSessionResponse) Reset() { - *x = GetCurrentSessionResponse{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCurrentSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCurrentSessionResponse) ProtoMessage() {} - -func (x *GetCurrentSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCurrentSessionResponse.ProtoReflect.Descriptor instead. -func (*GetCurrentSessionResponse) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{8} -} - -func (x *GetCurrentSessionResponse) GetSession() *Session { - if x != nil { - return x.Session - } - return nil -} - -type DeleteSessionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteSessionRequest) Reset() { - *x = DeleteSessionRequest{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSessionRequest) ProtoMessage() {} - -func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead. -func (*DeleteSessionRequest) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{9} -} - -type DeleteSessionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteSessionResponse) Reset() { - *x = DeleteSessionResponse{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSessionResponse) ProtoMessage() {} - -func (x *DeleteSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSessionResponse.ProtoReflect.Descriptor instead. -func (*DeleteSessionResponse) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{10} -} - -type CreateSessionValidationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cookie value (typically the fingerprint hash) to validate. - Cookie string `protobuf:"bytes,1,opt,name=cookie,proto3" json:"cookie,omitempty"` - Roles []string `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` - RequiredPermissions []*PermissionRef `protobuf:"bytes,3,rep,name=required_permissions,json=requiredPermissions,proto3" json:"required_permissions,omitempty"` -} - -func (x *CreateSessionValidationRequest) Reset() { - *x = CreateSessionValidationRequest{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateSessionValidationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSessionValidationRequest) ProtoMessage() {} - -func (x *CreateSessionValidationRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSessionValidationRequest.ProtoReflect.Descriptor instead. -func (*CreateSessionValidationRequest) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{11} -} - -func (x *CreateSessionValidationRequest) GetCookie() string { - if x != nil { - return x.Cookie - } - return "" -} - -func (x *CreateSessionValidationRequest) GetRoles() []string { - if x != nil { - return x.Roles - } - return nil -} - -func (x *CreateSessionValidationRequest) GetRequiredPermissions() []*PermissionRef { - if x != nil { - return x.RequiredPermissions - } - return nil -} - -type CreateSessionValidationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result *SessionValidationResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *CreateSessionValidationResponse) Reset() { - *x = CreateSessionValidationResponse{} - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateSessionValidationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSessionValidationResponse) ProtoMessage() {} - -func (x *CreateSessionValidationResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_session_v1_session_service_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSessionValidationResponse.ProtoReflect.Descriptor instead. -func (*CreateSessionValidationResponse) Descriptor() ([]byte, []int) { - return file_authorizer_session_v1_session_service_proto_rawDescGZIP(), []int{12} -} - -func (x *CreateSessionValidationResponse) GetResult() *SessionValidationResult { - if x != nil { - return x.Result - } - return nil -} - -var File_authorizer_session_v1_session_service_proto protoreflect.FileDescriptor - -var file_authorizer_session_v1_session_service_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x26, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf3, 0x02, 0x0a, - 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x03, 0x6f, 0x74, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, - 0x74, 0x70, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x6f, 0x74, 0x70, 0x12, 0x46, - 0x0a, 0x0a, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x67, 0x69, 0x63, - 0x4c, 0x69, 0x6e, 0x6b, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x61, 0x67, - 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x4f, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, - 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x0d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, - 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x26, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x01, 0x52, 0x08, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x08, 0x4f, 0x74, 0x70, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, - 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x1b, 0x0a, 0x03, 0x6f, 0x74, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, - 0xba, 0x48, 0x06, 0x72, 0x04, 0x10, 0x01, 0x18, 0x10, 0x52, 0x03, 0x6f, 0x74, 0x70, 0x12, 0x17, - 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x69, 0x73, 0x54, 0x6f, 0x74, 0x70, 0x22, 0x2f, 0x0a, 0x0e, 0x4d, 0x61, 0x67, 0x69, 0x63, - 0x4c, 0x69, 0x6e, 0x6b, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x41, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x2c, 0x0a, - 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb5, 0x01, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x52, 0x13, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x22, 0x53, 0x0a, 0x0d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x66, 0x12, 0x23, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x51, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x19, 0x47, - 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x57, 0x0a, - 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x66, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x69, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x32, 0xf8, 0x04, 0x0a, 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x23, 0x92, 0xb5, 0x18, 0x00, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1d, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x65, 0x12, 0x87, - 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x2b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x98, 0xb5, 0x18, - 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x2a, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x65, 0x12, 0xb1, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x27, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, - 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xf2, 0x01, 0x0a, - 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x41, 0x53, 0x58, 0xaa, 0x02, 0x15, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x21, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x5c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_session_v1_session_service_proto_rawDescOnce sync.Once - file_authorizer_session_v1_session_service_proto_rawDescData = file_authorizer_session_v1_session_service_proto_rawDesc -) - -func file_authorizer_session_v1_session_service_proto_rawDescGZIP() []byte { - file_authorizer_session_v1_session_service_proto_rawDescOnce.Do(func() { - file_authorizer_session_v1_session_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_session_v1_session_service_proto_rawDescData) - }) - return file_authorizer_session_v1_session_service_proto_rawDescData -} - -var file_authorizer_session_v1_session_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_authorizer_session_v1_session_service_proto_goTypes = []any{ - (*CreateSessionRequest)(nil), // 0: authorizer.session.v1.CreateSessionRequest - (*PasswordGrant)(nil), // 1: authorizer.session.v1.PasswordGrant - (*OtpGrant)(nil), // 2: authorizer.session.v1.OtpGrant - (*MagicLinkGrant)(nil), // 3: authorizer.session.v1.MagicLinkGrant - (*RefreshTokenGrant)(nil), // 4: authorizer.session.v1.RefreshTokenGrant - (*GetCurrentSessionRequest)(nil), // 5: authorizer.session.v1.GetCurrentSessionRequest - (*PermissionRef)(nil), // 6: authorizer.session.v1.PermissionRef - (*CreateSessionResponse)(nil), // 7: authorizer.session.v1.CreateSessionResponse - (*GetCurrentSessionResponse)(nil), // 8: authorizer.session.v1.GetCurrentSessionResponse - (*DeleteSessionRequest)(nil), // 9: authorizer.session.v1.DeleteSessionRequest - (*DeleteSessionResponse)(nil), // 10: authorizer.session.v1.DeleteSessionResponse - (*CreateSessionValidationRequest)(nil), // 11: authorizer.session.v1.CreateSessionValidationRequest - (*CreateSessionValidationResponse)(nil), // 12: authorizer.session.v1.CreateSessionValidationResponse - (*Session)(nil), // 13: authorizer.session.v1.Session - (*SessionValidationResult)(nil), // 14: authorizer.session.v1.SessionValidationResult -} -var file_authorizer_session_v1_session_service_proto_depIdxs = []int32{ - 1, // 0: authorizer.session.v1.CreateSessionRequest.password:type_name -> authorizer.session.v1.PasswordGrant - 2, // 1: authorizer.session.v1.CreateSessionRequest.otp:type_name -> authorizer.session.v1.OtpGrant - 3, // 2: authorizer.session.v1.CreateSessionRequest.magic_link:type_name -> authorizer.session.v1.MagicLinkGrant - 4, // 3: authorizer.session.v1.CreateSessionRequest.refresh_token:type_name -> authorizer.session.v1.RefreshTokenGrant - 6, // 4: authorizer.session.v1.GetCurrentSessionRequest.required_permissions:type_name -> authorizer.session.v1.PermissionRef - 13, // 5: authorizer.session.v1.CreateSessionResponse.session:type_name -> authorizer.session.v1.Session - 13, // 6: authorizer.session.v1.GetCurrentSessionResponse.session:type_name -> authorizer.session.v1.Session - 6, // 7: authorizer.session.v1.CreateSessionValidationRequest.required_permissions:type_name -> authorizer.session.v1.PermissionRef - 14, // 8: authorizer.session.v1.CreateSessionValidationResponse.result:type_name -> authorizer.session.v1.SessionValidationResult - 0, // 9: authorizer.session.v1.SessionService.CreateSession:input_type -> authorizer.session.v1.CreateSessionRequest - 5, // 10: authorizer.session.v1.SessionService.GetCurrentSession:input_type -> authorizer.session.v1.GetCurrentSessionRequest - 9, // 11: authorizer.session.v1.SessionService.DeleteSession:input_type -> authorizer.session.v1.DeleteSessionRequest - 11, // 12: authorizer.session.v1.SessionService.CreateSessionValidation:input_type -> authorizer.session.v1.CreateSessionValidationRequest - 7, // 13: authorizer.session.v1.SessionService.CreateSession:output_type -> authorizer.session.v1.CreateSessionResponse - 8, // 14: authorizer.session.v1.SessionService.GetCurrentSession:output_type -> authorizer.session.v1.GetCurrentSessionResponse - 10, // 15: authorizer.session.v1.SessionService.DeleteSession:output_type -> authorizer.session.v1.DeleteSessionResponse - 12, // 16: authorizer.session.v1.SessionService.CreateSessionValidation:output_type -> authorizer.session.v1.CreateSessionValidationResponse - 13, // [13:17] is the sub-list for method output_type - 9, // [9:13] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_authorizer_session_v1_session_service_proto_init() } -func file_authorizer_session_v1_session_service_proto_init() { - if File_authorizer_session_v1_session_service_proto != nil { - return - } - file_authorizer_session_v1_session_proto_init() - file_authorizer_session_v1_session_service_proto_msgTypes[0].OneofWrappers = []any{ - (*CreateSessionRequest_Password)(nil), - (*CreateSessionRequest_Otp)(nil), - (*CreateSessionRequest_MagicLink)(nil), - (*CreateSessionRequest_RefreshToken)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_session_v1_session_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_authorizer_session_v1_session_service_proto_goTypes, - DependencyIndexes: file_authorizer_session_v1_session_service_proto_depIdxs, - MessageInfos: file_authorizer_session_v1_session_service_proto_msgTypes, - }.Build() - File_authorizer_session_v1_session_service_proto = out.File - file_authorizer_session_v1_session_service_proto_rawDesc = nil - file_authorizer_session_v1_session_service_proto_goTypes = nil - file_authorizer_session_v1_session_service_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/session/v1/session_service.pb.gw.go b/gen/go/authorizer/session/v1/session_service.pb.gw.go deleted file mode 100644 index 17684b5b..00000000 --- a/gen/go/authorizer/session/v1/session_service.pb.gw.go +++ /dev/null @@ -1,397 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: authorizer/session/v1/session_service.proto - -/* -Package sessionv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package sessionv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_SessionService_CreateSession_0(ctx context.Context, marshaler runtime.Marshaler, client SessionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateSessionRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SessionService_CreateSession_0(ctx context.Context, marshaler runtime.Marshaler, server SessionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateSessionRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateSession(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SessionService_GetCurrentSession_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SessionService_GetCurrentSession_0(ctx context.Context, marshaler runtime.Marshaler, client SessionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCurrentSessionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SessionService_GetCurrentSession_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetCurrentSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SessionService_GetCurrentSession_0(ctx context.Context, marshaler runtime.Marshaler, server SessionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCurrentSessionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SessionService_GetCurrentSession_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetCurrentSession(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SessionService_DeleteSession_0(ctx context.Context, marshaler runtime.Marshaler, client SessionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSessionRequest - var metadata runtime.ServerMetadata - - msg, err := client.DeleteSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SessionService_DeleteSession_0(ctx context.Context, marshaler runtime.Marshaler, server SessionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSessionRequest - var metadata runtime.ServerMetadata - - msg, err := server.DeleteSession(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SessionService_CreateSessionValidation_0(ctx context.Context, marshaler runtime.Marshaler, client SessionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateSessionValidationRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateSessionValidation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SessionService_CreateSessionValidation_0(ctx context.Context, marshaler runtime.Marshaler, server SessionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateSessionValidationRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateSessionValidation(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterSessionServiceHandlerServer registers the http handlers for service SessionService to "mux". -// UnaryRPC :call SessionServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSessionServiceHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterSessionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SessionServiceServer) error { - - mux.Handle("POST", pattern_SessionService_CreateSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.session.v1.SessionService/CreateSession", runtime.WithHTTPPathPattern("/v1/sessions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SessionService_CreateSession_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SessionService_CreateSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SessionService_GetCurrentSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.session.v1.SessionService/GetCurrentSession", runtime.WithHTTPPathPattern("/v1/sessions/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SessionService_GetCurrentSession_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SessionService_GetCurrentSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_SessionService_DeleteSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.session.v1.SessionService/DeleteSession", runtime.WithHTTPPathPattern("/v1/sessions/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SessionService_DeleteSession_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SessionService_DeleteSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SessionService_CreateSessionValidation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.session.v1.SessionService/CreateSessionValidation", runtime.WithHTTPPathPattern("/v1/sessions/validations")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SessionService_CreateSessionValidation_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SessionService_CreateSessionValidation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterSessionServiceHandlerFromEndpoint is same as RegisterSessionServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterSessionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterSessionServiceHandler(ctx, mux, conn) -} - -// RegisterSessionServiceHandler registers the http handlers for service SessionService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterSessionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterSessionServiceHandlerClient(ctx, mux, NewSessionServiceClient(conn)) -} - -// RegisterSessionServiceHandlerClient registers the http handlers for service SessionService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SessionServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SessionServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SessionServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterSessionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SessionServiceClient) error { - - mux.Handle("POST", pattern_SessionService_CreateSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.session.v1.SessionService/CreateSession", runtime.WithHTTPPathPattern("/v1/sessions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SessionService_CreateSession_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SessionService_CreateSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SessionService_GetCurrentSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.session.v1.SessionService/GetCurrentSession", runtime.WithHTTPPathPattern("/v1/sessions/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SessionService_GetCurrentSession_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SessionService_GetCurrentSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_SessionService_DeleteSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.session.v1.SessionService/DeleteSession", runtime.WithHTTPPathPattern("/v1/sessions/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SessionService_DeleteSession_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SessionService_DeleteSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SessionService_CreateSessionValidation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.session.v1.SessionService/CreateSessionValidation", runtime.WithHTTPPathPattern("/v1/sessions/validations")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SessionService_CreateSessionValidation_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SessionService_CreateSessionValidation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_SessionService_CreateSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "sessions"}, "")) - - pattern_SessionService_GetCurrentSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sessions", "me"}, "")) - - pattern_SessionService_DeleteSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sessions", "me"}, "")) - - pattern_SessionService_CreateSessionValidation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sessions", "validations"}, "")) -) - -var ( - forward_SessionService_CreateSession_0 = runtime.ForwardResponseMessage - - forward_SessionService_GetCurrentSession_0 = runtime.ForwardResponseMessage - - forward_SessionService_DeleteSession_0 = runtime.ForwardResponseMessage - - forward_SessionService_CreateSessionValidation_0 = runtime.ForwardResponseMessage -) diff --git a/gen/go/authorizer/session/v1/session_service_grpc.pb.go b/gen/go/authorizer/session/v1/session_service_grpc.pb.go deleted file mode 100644 index c8d21bfc..00000000 --- a/gen/go/authorizer/session/v1/session_service_grpc.pb.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: authorizer/session/v1/session_service.proto - -package sessionv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - SessionService_CreateSession_FullMethodName = "/authorizer.session.v1.SessionService/CreateSession" - SessionService_GetCurrentSession_FullMethodName = "/authorizer.session.v1.SessionService/GetCurrentSession" - SessionService_DeleteSession_FullMethodName = "/authorizer.session.v1.SessionService/DeleteSession" - SessionService_CreateSessionValidation_FullMethodName = "/authorizer.session.v1.SessionService/CreateSessionValidation" -) - -// SessionServiceClient is the client API for SessionService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// SessionService manages user sessions. Creating a session is "login"; -// deleting it is "logout"; reading the current session answers "am I -// authenticated, and as whom?". -type SessionServiceClient interface { - // CreateSession authenticates a user and returns a new Session. The - // request carries exactly one credential type via `oneof grant`. Browser - // callers (REST) additionally receive Set-Cookie headers. The OAuth2 - // token endpoint at POST /oauth/token remains the spec-compliant - // alternative for OAuth clients. - CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error) - // GetCurrentSession returns the session bound to the caller's cookie or - // bearer token. Returns NOT_FOUND when unauthenticated. - GetCurrentSession(ctx context.Context, in *GetCurrentSessionRequest, opts ...grpc.CallOption) (*GetCurrentSessionResponse, error) - // DeleteSession ends the caller's current session. Always returns empty - // on success, even if no session was active (idempotent). - DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*DeleteSessionResponse, error) - // CreateSessionValidation validates a cookie/token held by a third party - // — the typed equivalent of "is this session real?" used by backend - // services validating tokens forwarded by an upstream proxy. - CreateSessionValidation(ctx context.Context, in *CreateSessionValidationRequest, opts ...grpc.CallOption) (*CreateSessionValidationResponse, error) -} - -type sessionServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient { - return &sessionServiceClient{cc} -} - -func (c *sessionServiceClient) CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateSessionResponse) - err := c.cc.Invoke(ctx, SessionService_CreateSession_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *sessionServiceClient) GetCurrentSession(ctx context.Context, in *GetCurrentSessionRequest, opts ...grpc.CallOption) (*GetCurrentSessionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetCurrentSessionResponse) - err := c.cc.Invoke(ctx, SessionService_GetCurrentSession_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *sessionServiceClient) DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*DeleteSessionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteSessionResponse) - err := c.cc.Invoke(ctx, SessionService_DeleteSession_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *sessionServiceClient) CreateSessionValidation(ctx context.Context, in *CreateSessionValidationRequest, opts ...grpc.CallOption) (*CreateSessionValidationResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateSessionValidationResponse) - err := c.cc.Invoke(ctx, SessionService_CreateSessionValidation_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SessionServiceServer is the server API for SessionService service. -// All implementations should embed UnimplementedSessionServiceServer -// for forward compatibility. -// -// SessionService manages user sessions. Creating a session is "login"; -// deleting it is "logout"; reading the current session answers "am I -// authenticated, and as whom?". -type SessionServiceServer interface { - // CreateSession authenticates a user and returns a new Session. The - // request carries exactly one credential type via `oneof grant`. Browser - // callers (REST) additionally receive Set-Cookie headers. The OAuth2 - // token endpoint at POST /oauth/token remains the spec-compliant - // alternative for OAuth clients. - CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) - // GetCurrentSession returns the session bound to the caller's cookie or - // bearer token. Returns NOT_FOUND when unauthenticated. - GetCurrentSession(context.Context, *GetCurrentSessionRequest) (*GetCurrentSessionResponse, error) - // DeleteSession ends the caller's current session. Always returns empty - // on success, even if no session was active (idempotent). - DeleteSession(context.Context, *DeleteSessionRequest) (*DeleteSessionResponse, error) - // CreateSessionValidation validates a cookie/token held by a third party - // — the typed equivalent of "is this session real?" used by backend - // services validating tokens forwarded by an upstream proxy. - CreateSessionValidation(context.Context, *CreateSessionValidationRequest) (*CreateSessionValidationResponse, error) -} - -// UnimplementedSessionServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedSessionServiceServer struct{} - -func (UnimplementedSessionServiceServer) CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSession not implemented") -} -func (UnimplementedSessionServiceServer) GetCurrentSession(context.Context, *GetCurrentSessionRequest) (*GetCurrentSessionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCurrentSession not implemented") -} -func (UnimplementedSessionServiceServer) DeleteSession(context.Context, *DeleteSessionRequest) (*DeleteSessionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteSession not implemented") -} -func (UnimplementedSessionServiceServer) CreateSessionValidation(context.Context, *CreateSessionValidationRequest) (*CreateSessionValidationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSessionValidation not implemented") -} -func (UnimplementedSessionServiceServer) testEmbeddedByValue() {} - -// UnsafeSessionServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SessionServiceServer will -// result in compilation errors. -type UnsafeSessionServiceServer interface { - mustEmbedUnimplementedSessionServiceServer() -} - -func RegisterSessionServiceServer(s grpc.ServiceRegistrar, srv SessionServiceServer) { - // If the following call pancis, it indicates UnimplementedSessionServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&SessionService_ServiceDesc, srv) -} - -func _SessionService_CreateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSessionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SessionServiceServer).CreateSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SessionService_CreateSession_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SessionServiceServer).CreateSession(ctx, req.(*CreateSessionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SessionService_GetCurrentSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCurrentSessionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SessionServiceServer).GetCurrentSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SessionService_GetCurrentSession_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SessionServiceServer).GetCurrentSession(ctx, req.(*GetCurrentSessionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SessionService_DeleteSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteSessionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SessionServiceServer).DeleteSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SessionService_DeleteSession_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SessionServiceServer).DeleteSession(ctx, req.(*DeleteSessionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SessionService_CreateSessionValidation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSessionValidationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SessionServiceServer).CreateSessionValidation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SessionService_CreateSessionValidation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SessionServiceServer).CreateSessionValidation(ctx, req.(*CreateSessionValidationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// SessionService_ServiceDesc is the grpc.ServiceDesc for SessionService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var SessionService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.session.v1.SessionService", - HandlerType: (*SessionServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateSession", - Handler: _SessionService_CreateSession_Handler, - }, - { - MethodName: "GetCurrentSession", - Handler: _SessionService_GetCurrentSession_Handler, - }, - { - MethodName: "DeleteSession", - Handler: _SessionService_DeleteSession_Handler, - }, - { - MethodName: "CreateSessionValidation", - Handler: _SessionService_CreateSessionValidation_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authorizer/session/v1/session_service.proto", -} diff --git a/gen/go/authorizer/token/v1/token_service.pb.go b/gen/go/authorizer/token/v1/token_service.pb.go deleted file mode 100644 index cfadfe9d..00000000 --- a/gen/go/authorizer/token/v1/token_service.pb.go +++ /dev/null @@ -1,429 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/token/v1/token_service.proto - -package tokenv1 - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - _ "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateTokenValidationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // One of: "access_token", "id_token", "refresh_token". - TokenType string `protobuf:"bytes,1,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"` - RequiredPermissions []*PermissionRef `protobuf:"bytes,4,rep,name=required_permissions,json=requiredPermissions,proto3" json:"required_permissions,omitempty"` -} - -func (x *CreateTokenValidationRequest) Reset() { - *x = CreateTokenValidationRequest{} - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTokenValidationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTokenValidationRequest) ProtoMessage() {} - -func (x *CreateTokenValidationRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTokenValidationRequest.ProtoReflect.Descriptor instead. -func (*CreateTokenValidationRequest) Descriptor() ([]byte, []int) { - return file_authorizer_token_v1_token_service_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateTokenValidationRequest) GetTokenType() string { - if x != nil { - return x.TokenType - } - return "" -} - -func (x *CreateTokenValidationRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *CreateTokenValidationRequest) GetRoles() []string { - if x != nil { - return x.Roles - } - return nil -} - -func (x *CreateTokenValidationRequest) GetRequiredPermissions() []*PermissionRef { - if x != nil { - return x.RequiredPermissions - } - return nil -} - -type PermissionRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` -} - -func (x *PermissionRef) Reset() { - *x = PermissionRef{} - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PermissionRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PermissionRef) ProtoMessage() {} - -func (x *PermissionRef) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PermissionRef.ProtoReflect.Descriptor instead. -func (*PermissionRef) Descriptor() ([]byte, []int) { - return file_authorizer_token_v1_token_service_proto_rawDescGZIP(), []int{1} -} - -func (x *PermissionRef) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *PermissionRef) GetScope() string { - if x != nil { - return x.Scope - } - return "" -} - -type CreateTokenValidationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` - // Free-form JWT claims; matches GraphQL ValidateJWTTokenResponse.claims. - Claims *structpb.Struct `protobuf:"bytes,2,opt,name=claims,proto3" json:"claims,omitempty"` -} - -func (x *CreateTokenValidationResponse) Reset() { - *x = CreateTokenValidationResponse{} - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateTokenValidationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTokenValidationResponse) ProtoMessage() {} - -func (x *CreateTokenValidationResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTokenValidationResponse.ProtoReflect.Descriptor instead. -func (*CreateTokenValidationResponse) Descriptor() ([]byte, []int) { - return file_authorizer_token_v1_token_service_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateTokenValidationResponse) GetIsValid() bool { - if x != nil { - return x.IsValid - } - return false -} - -func (x *CreateTokenValidationResponse) GetClaims() *structpb.Struct { - if x != nil { - return x.Claims - } - return nil -} - -type RevokeRefreshTokenRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` -} - -func (x *RevokeRefreshTokenRequest) Reset() { - *x = RevokeRefreshTokenRequest{} - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RevokeRefreshTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokeRefreshTokenRequest) ProtoMessage() {} - -func (x *RevokeRefreshTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RevokeRefreshTokenRequest.ProtoReflect.Descriptor instead. -func (*RevokeRefreshTokenRequest) Descriptor() ([]byte, []int) { - return file_authorizer_token_v1_token_service_proto_rawDescGZIP(), []int{3} -} - -func (x *RevokeRefreshTokenRequest) GetRefreshToken() string { - if x != nil { - return x.RefreshToken - } - return "" -} - -type RevokeRefreshTokenResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RevokeRefreshTokenResponse) Reset() { - *x = RevokeRefreshTokenResponse{} - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RevokeRefreshTokenResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokeRefreshTokenResponse) ProtoMessage() {} - -func (x *RevokeRefreshTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_token_v1_token_service_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RevokeRefreshTokenResponse.ProtoReflect.Descriptor instead. -func (*RevokeRefreshTokenResponse) Descriptor() ([]byte, []int) { - return file_authorizer_token_v1_token_service_proto_rawDescGZIP(), []int{4} -} - -var File_authorizer_token_v1_token_service_proto protoreflect.FileDescriptor - -var file_authorizer_token_v1_token_service_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1b, - 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xd2, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x26, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x55, 0x0a, - 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x52, - 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x53, 0x0a, 0x0d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x12, 0x23, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x6b, 0x0a, 0x1d, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, - 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x22, 0x49, 0x0a, 0x19, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0xdd, 0x02, 0x0a, 0x0c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0xa4, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x24, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, - 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2d, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xa5, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2e, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2e, 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x2a, 0x22, 0x2f, 0x76, 0x31, - 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x2d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2f, - 0x7b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x7d, 0x42, - 0xe2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x72, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2f, 0x76, 0x31, - 0x3b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x54, 0x58, 0xaa, 0x02, - 0x13, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x72, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_token_v1_token_service_proto_rawDescOnce sync.Once - file_authorizer_token_v1_token_service_proto_rawDescData = file_authorizer_token_v1_token_service_proto_rawDesc -) - -func file_authorizer_token_v1_token_service_proto_rawDescGZIP() []byte { - file_authorizer_token_v1_token_service_proto_rawDescOnce.Do(func() { - file_authorizer_token_v1_token_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_token_v1_token_service_proto_rawDescData) - }) - return file_authorizer_token_v1_token_service_proto_rawDescData -} - -var file_authorizer_token_v1_token_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_authorizer_token_v1_token_service_proto_goTypes = []any{ - (*CreateTokenValidationRequest)(nil), // 0: authorizer.token.v1.CreateTokenValidationRequest - (*PermissionRef)(nil), // 1: authorizer.token.v1.PermissionRef - (*CreateTokenValidationResponse)(nil), // 2: authorizer.token.v1.CreateTokenValidationResponse - (*RevokeRefreshTokenRequest)(nil), // 3: authorizer.token.v1.RevokeRefreshTokenRequest - (*RevokeRefreshTokenResponse)(nil), // 4: authorizer.token.v1.RevokeRefreshTokenResponse - (*structpb.Struct)(nil), // 5: google.protobuf.Struct -} -var file_authorizer_token_v1_token_service_proto_depIdxs = []int32{ - 1, // 0: authorizer.token.v1.CreateTokenValidationRequest.required_permissions:type_name -> authorizer.token.v1.PermissionRef - 5, // 1: authorizer.token.v1.CreateTokenValidationResponse.claims:type_name -> google.protobuf.Struct - 0, // 2: authorizer.token.v1.TokenService.CreateTokenValidation:input_type -> authorizer.token.v1.CreateTokenValidationRequest - 3, // 3: authorizer.token.v1.TokenService.RevokeRefreshToken:input_type -> authorizer.token.v1.RevokeRefreshTokenRequest - 2, // 4: authorizer.token.v1.TokenService.CreateTokenValidation:output_type -> authorizer.token.v1.CreateTokenValidationResponse - 4, // 5: authorizer.token.v1.TokenService.RevokeRefreshToken:output_type -> authorizer.token.v1.RevokeRefreshTokenResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_authorizer_token_v1_token_service_proto_init() } -func file_authorizer_token_v1_token_service_proto_init() { - if File_authorizer_token_v1_token_service_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_token_v1_token_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_authorizer_token_v1_token_service_proto_goTypes, - DependencyIndexes: file_authorizer_token_v1_token_service_proto_depIdxs, - MessageInfos: file_authorizer_token_v1_token_service_proto_msgTypes, - }.Build() - File_authorizer_token_v1_token_service_proto = out.File - file_authorizer_token_v1_token_service_proto_rawDesc = nil - file_authorizer_token_v1_token_service_proto_goTypes = nil - file_authorizer_token_v1_token_service_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/token/v1/token_service.pb.gw.go b/gen/go/authorizer/token/v1/token_service.pb.gw.go deleted file mode 100644 index 297c1803..00000000 --- a/gen/go/authorizer/token/v1/token_service.pb.gw.go +++ /dev/null @@ -1,267 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: authorizer/token/v1/token_service.proto - -/* -Package tokenv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package tokenv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_TokenService_CreateTokenValidation_0(ctx context.Context, marshaler runtime.Marshaler, client TokenServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateTokenValidationRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateTokenValidation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TokenService_CreateTokenValidation_0(ctx context.Context, marshaler runtime.Marshaler, server TokenServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateTokenValidationRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateTokenValidation(ctx, &protoReq) - return msg, metadata, err - -} - -func request_TokenService_RevokeRefreshToken_0(ctx context.Context, marshaler runtime.Marshaler, client TokenServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RevokeRefreshTokenRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["refresh_token"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "refresh_token") - } - - protoReq.RefreshToken, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "refresh_token", err) - } - - msg, err := client.RevokeRefreshToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TokenService_RevokeRefreshToken_0(ctx context.Context, marshaler runtime.Marshaler, server TokenServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RevokeRefreshTokenRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["refresh_token"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "refresh_token") - } - - protoReq.RefreshToken, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "refresh_token", err) - } - - msg, err := server.RevokeRefreshToken(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterTokenServiceHandlerServer registers the http handlers for service TokenService to "mux". -// UnaryRPC :call TokenServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTokenServiceHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterTokenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TokenServiceServer) error { - - mux.Handle("POST", pattern_TokenService_CreateTokenValidation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.token.v1.TokenService/CreateTokenValidation", runtime.WithHTTPPathPattern("/v1/token-validations")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TokenService_CreateTokenValidation_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TokenService_CreateTokenValidation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_TokenService_RevokeRefreshToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.token.v1.TokenService/RevokeRefreshToken", runtime.WithHTTPPathPattern("/v1/refresh-tokens/{refresh_token}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TokenService_RevokeRefreshToken_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TokenService_RevokeRefreshToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterTokenServiceHandlerFromEndpoint is same as RegisterTokenServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterTokenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterTokenServiceHandler(ctx, mux, conn) -} - -// RegisterTokenServiceHandler registers the http handlers for service TokenService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterTokenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterTokenServiceHandlerClient(ctx, mux, NewTokenServiceClient(conn)) -} - -// RegisterTokenServiceHandlerClient registers the http handlers for service TokenService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TokenServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TokenServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "TokenServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterTokenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TokenServiceClient) error { - - mux.Handle("POST", pattern_TokenService_CreateTokenValidation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.token.v1.TokenService/CreateTokenValidation", runtime.WithHTTPPathPattern("/v1/token-validations")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_TokenService_CreateTokenValidation_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TokenService_CreateTokenValidation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_TokenService_RevokeRefreshToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.token.v1.TokenService/RevokeRefreshToken", runtime.WithHTTPPathPattern("/v1/refresh-tokens/{refresh_token}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_TokenService_RevokeRefreshToken_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_TokenService_RevokeRefreshToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_TokenService_CreateTokenValidation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "token-validations"}, "")) - - pattern_TokenService_RevokeRefreshToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "refresh-tokens", "refresh_token"}, "")) -) - -var ( - forward_TokenService_CreateTokenValidation_0 = runtime.ForwardResponseMessage - - forward_TokenService_RevokeRefreshToken_0 = runtime.ForwardResponseMessage -) diff --git a/gen/go/authorizer/token/v1/token_service_grpc.pb.go b/gen/go/authorizer/token/v1/token_service_grpc.pb.go deleted file mode 100644 index 68a4dc6f..00000000 --- a/gen/go/authorizer/token/v1/token_service_grpc.pb.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: authorizer/token/v1/token_service.proto - -package tokenv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - TokenService_CreateTokenValidation_FullMethodName = "/authorizer.token.v1.TokenService/CreateTokenValidation" - TokenService_RevokeRefreshToken_FullMethodName = "/authorizer.token.v1.TokenService/RevokeRefreshToken" -) - -// TokenServiceClient is the client API for TokenService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// TokenService operates on existing tokens — distinct from SessionService -// (which *issues* tokens via login). RFC 7009 token revocation and RFC 7662 -// introspection remain at their standards-mandated /oauth/* HTTP paths for -// OAuth-spec compatibility; this service offers typed mirrors for -// first-party SDK use. -type TokenServiceClient interface { - // CreateTokenValidation validates a JWT and returns its claims. Equivalent - // to GraphQL validate_jwt_token. - CreateTokenValidation(ctx context.Context, in *CreateTokenValidationRequest, opts ...grpc.CallOption) (*CreateTokenValidationResponse, error) - // RevokeRefreshToken invalidates a refresh token. Typed mirror of - // RFC 7009 `POST /oauth/revoke`. - RevokeRefreshToken(ctx context.Context, in *RevokeRefreshTokenRequest, opts ...grpc.CallOption) (*RevokeRefreshTokenResponse, error) -} - -type tokenServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewTokenServiceClient(cc grpc.ClientConnInterface) TokenServiceClient { - return &tokenServiceClient{cc} -} - -func (c *tokenServiceClient) CreateTokenValidation(ctx context.Context, in *CreateTokenValidationRequest, opts ...grpc.CallOption) (*CreateTokenValidationResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateTokenValidationResponse) - err := c.cc.Invoke(ctx, TokenService_CreateTokenValidation_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tokenServiceClient) RevokeRefreshToken(ctx context.Context, in *RevokeRefreshTokenRequest, opts ...grpc.CallOption) (*RevokeRefreshTokenResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RevokeRefreshTokenResponse) - err := c.cc.Invoke(ctx, TokenService_RevokeRefreshToken_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TokenServiceServer is the server API for TokenService service. -// All implementations should embed UnimplementedTokenServiceServer -// for forward compatibility. -// -// TokenService operates on existing tokens — distinct from SessionService -// (which *issues* tokens via login). RFC 7009 token revocation and RFC 7662 -// introspection remain at their standards-mandated /oauth/* HTTP paths for -// OAuth-spec compatibility; this service offers typed mirrors for -// first-party SDK use. -type TokenServiceServer interface { - // CreateTokenValidation validates a JWT and returns its claims. Equivalent - // to GraphQL validate_jwt_token. - CreateTokenValidation(context.Context, *CreateTokenValidationRequest) (*CreateTokenValidationResponse, error) - // RevokeRefreshToken invalidates a refresh token. Typed mirror of - // RFC 7009 `POST /oauth/revoke`. - RevokeRefreshToken(context.Context, *RevokeRefreshTokenRequest) (*RevokeRefreshTokenResponse, error) -} - -// UnimplementedTokenServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedTokenServiceServer struct{} - -func (UnimplementedTokenServiceServer) CreateTokenValidation(context.Context, *CreateTokenValidationRequest) (*CreateTokenValidationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTokenValidation not implemented") -} -func (UnimplementedTokenServiceServer) RevokeRefreshToken(context.Context, *RevokeRefreshTokenRequest) (*RevokeRefreshTokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RevokeRefreshToken not implemented") -} -func (UnimplementedTokenServiceServer) testEmbeddedByValue() {} - -// UnsafeTokenServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TokenServiceServer will -// result in compilation errors. -type UnsafeTokenServiceServer interface { - mustEmbedUnimplementedTokenServiceServer() -} - -func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer) { - // If the following call pancis, it indicates UnimplementedTokenServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&TokenService_ServiceDesc, srv) -} - -func _TokenService_CreateTokenValidation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTokenValidationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TokenServiceServer).CreateTokenValidation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TokenService_CreateTokenValidation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TokenServiceServer).CreateTokenValidation(ctx, req.(*CreateTokenValidationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TokenService_RevokeRefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RevokeRefreshTokenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TokenServiceServer).RevokeRefreshToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TokenService_RevokeRefreshToken_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TokenServiceServer).RevokeRefreshToken(ctx, req.(*RevokeRefreshTokenRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// TokenService_ServiceDesc is the grpc.ServiceDesc for TokenService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TokenService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.token.v1.TokenService", - HandlerType: (*TokenServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateTokenValidation", - Handler: _TokenService_CreateTokenValidation_Handler, - }, - { - MethodName: "RevokeRefreshToken", - Handler: _TokenService_RevokeRefreshToken_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authorizer/token/v1/token_service.proto", -} diff --git a/gen/go/authorizer/user/v1/user.pb.go b/gen/go/authorizer/user/v1/user.pb.go deleted file mode 100644 index 34b91ea6..00000000 --- a/gen/go/authorizer/user/v1/user.pb.go +++ /dev/null @@ -1,348 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/user/v1/user.proto - -package userv1 - -import ( - v1 "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// User mirrors the GraphQL User type. Field names match the existing -// JSON/GraphQL surface so REST callers see the same shape. -// -// The canonical resource name is either "users/me" (the caller) or -// "users/{id}". Other RPCs accept this string form via the `name` field on -// their requests. -type User struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Either email or phone_number is always present. - Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` - EmailVerified bool `protobuf:"varint,3,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"` - SignupMethods string `protobuf:"bytes,4,opt,name=signup_methods,json=signupMethods,proto3" json:"signup_methods,omitempty"` - GivenName string `protobuf:"bytes,5,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"` - FamilyName string `protobuf:"bytes,6,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"` - MiddleName string `protobuf:"bytes,7,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"` - Nickname string `protobuf:"bytes,8,opt,name=nickname,proto3" json:"nickname,omitempty"` - // Defaults to email when unset. - PreferredUsername string `protobuf:"bytes,9,opt,name=preferred_username,json=preferredUsername,proto3" json:"preferred_username,omitempty"` - Gender string `protobuf:"bytes,10,opt,name=gender,proto3" json:"gender,omitempty"` - Birthdate string `protobuf:"bytes,11,opt,name=birthdate,proto3" json:"birthdate,omitempty"` - PhoneNumber string `protobuf:"bytes,12,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - PhoneNumberVerified bool `protobuf:"varint,13,opt,name=phone_number_verified,json=phoneNumberVerified,proto3" json:"phone_number_verified,omitempty"` - Picture string `protobuf:"bytes,14,opt,name=picture,proto3" json:"picture,omitempty"` - Roles []string `protobuf:"bytes,15,rep,name=roles,proto3" json:"roles,omitempty"` - CreatedAt int64 `protobuf:"varint,16,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt int64 `protobuf:"varint,17,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - RevokedTimestamp int64 `protobuf:"varint,18,opt,name=revoked_timestamp,json=revokedTimestamp,proto3" json:"revoked_timestamp,omitempty"` - IsMultiFactorAuthEnabled bool `protobuf:"varint,19,opt,name=is_multi_factor_auth_enabled,json=isMultiFactorAuthEnabled,proto3" json:"is_multi_factor_auth_enabled,omitempty"` - // Free-form key/value bag — same as GraphQL `app_data: Map`. - AppData *v1.AppData `protobuf:"bytes,20,opt,name=app_data,json=appData,proto3" json:"app_data,omitempty"` -} - -func (x *User) Reset() { - *x = User{} - mi := &file_authorizer_user_v1_user_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *User) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*User) ProtoMessage() {} - -func (x *User) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_user_v1_user_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use User.ProtoReflect.Descriptor instead. -func (*User) Descriptor() ([]byte, []int) { - return file_authorizer_user_v1_user_proto_rawDescGZIP(), []int{0} -} - -func (x *User) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *User) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *User) GetEmailVerified() bool { - if x != nil { - return x.EmailVerified - } - return false -} - -func (x *User) GetSignupMethods() string { - if x != nil { - return x.SignupMethods - } - return "" -} - -func (x *User) GetGivenName() string { - if x != nil { - return x.GivenName - } - return "" -} - -func (x *User) GetFamilyName() string { - if x != nil { - return x.FamilyName - } - return "" -} - -func (x *User) GetMiddleName() string { - if x != nil { - return x.MiddleName - } - return "" -} - -func (x *User) GetNickname() string { - if x != nil { - return x.Nickname - } - return "" -} - -func (x *User) GetPreferredUsername() string { - if x != nil { - return x.PreferredUsername - } - return "" -} - -func (x *User) GetGender() string { - if x != nil { - return x.Gender - } - return "" -} - -func (x *User) GetBirthdate() string { - if x != nil { - return x.Birthdate - } - return "" -} - -func (x *User) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *User) GetPhoneNumberVerified() bool { - if x != nil { - return x.PhoneNumberVerified - } - return false -} - -func (x *User) GetPicture() string { - if x != nil { - return x.Picture - } - return "" -} - -func (x *User) GetRoles() []string { - if x != nil { - return x.Roles - } - return nil -} - -func (x *User) GetCreatedAt() int64 { - if x != nil { - return x.CreatedAt - } - return 0 -} - -func (x *User) GetUpdatedAt() int64 { - if x != nil { - return x.UpdatedAt - } - return 0 -} - -func (x *User) GetRevokedTimestamp() int64 { - if x != nil { - return x.RevokedTimestamp - } - return 0 -} - -func (x *User) GetIsMultiFactorAuthEnabled() bool { - if x != nil { - return x.IsMultiFactorAuthEnabled - } - return false -} - -func (x *User) GetAppData() *v1.AppData { - if x != nil { - return x.AppData - } - return nil -} - -var File_authorizer_user_v1_user_proto protoreflect.FileDescriptor - -var file_authorizer_user_v1_user_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x05, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6d, - 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x73, - 0x69, 0x67, 0x6e, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, - 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, - 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, - 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x69, - 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x0f, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x1c, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x69, 0x73, - 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x75, 0x74, 0x68, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x61, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, - 0x42, 0xd3, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x55, 0x73, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, - 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, - 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x41, 0x55, 0x58, 0xaa, 0x02, 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x55, 0x73, 0x65, 0x72, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x55, 0x73, - 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_user_v1_user_proto_rawDescOnce sync.Once - file_authorizer_user_v1_user_proto_rawDescData = file_authorizer_user_v1_user_proto_rawDesc -) - -func file_authorizer_user_v1_user_proto_rawDescGZIP() []byte { - file_authorizer_user_v1_user_proto_rawDescOnce.Do(func() { - file_authorizer_user_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_user_v1_user_proto_rawDescData) - }) - return file_authorizer_user_v1_user_proto_rawDescData -} - -var file_authorizer_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_authorizer_user_v1_user_proto_goTypes = []any{ - (*User)(nil), // 0: authorizer.user.v1.User - (*v1.AppData)(nil), // 1: authorizer.common.v1.AppData -} -var file_authorizer_user_v1_user_proto_depIdxs = []int32{ - 1, // 0: authorizer.user.v1.User.app_data:type_name -> authorizer.common.v1.AppData - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_authorizer_user_v1_user_proto_init() } -func file_authorizer_user_v1_user_proto_init() { - if File_authorizer_user_v1_user_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_user_v1_user_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_authorizer_user_v1_user_proto_goTypes, - DependencyIndexes: file_authorizer_user_v1_user_proto_depIdxs, - MessageInfos: file_authorizer_user_v1_user_proto_msgTypes, - }.Build() - File_authorizer_user_v1_user_proto = out.File - file_authorizer_user_v1_user_proto_rawDesc = nil - file_authorizer_user_v1_user_proto_goTypes = nil - file_authorizer_user_v1_user_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/user/v1/user_service.pb.go b/gen/go/authorizer/user/v1/user_service.pb.go deleted file mode 100644 index 9d1dac12..00000000 --- a/gen/go/authorizer/user/v1/user_service.pb.go +++ /dev/null @@ -1,849 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/user/v1/user_service.proto - -package userv1 - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - v1 "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Email or phone_number must be set (validated at the handler). - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - ConfirmPassword string `protobuf:"bytes,4,opt,name=confirm_password,json=confirmPassword,proto3" json:"confirm_password,omitempty"` - GivenName string `protobuf:"bytes,5,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"` - FamilyName string `protobuf:"bytes,6,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"` - MiddleName string `protobuf:"bytes,7,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"` - Nickname string `protobuf:"bytes,8,opt,name=nickname,proto3" json:"nickname,omitempty"` - Gender string `protobuf:"bytes,9,opt,name=gender,proto3" json:"gender,omitempty"` - Birthdate string `protobuf:"bytes,10,opt,name=birthdate,proto3" json:"birthdate,omitempty"` - Picture string `protobuf:"bytes,11,opt,name=picture,proto3" json:"picture,omitempty"` - Roles []string `protobuf:"bytes,12,rep,name=roles,proto3" json:"roles,omitempty"` - Scope []string `protobuf:"bytes,13,rep,name=scope,proto3" json:"scope,omitempty"` - RedirectUri string `protobuf:"bytes,14,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` - IsMultiFactorAuthEnabled bool `protobuf:"varint,15,opt,name=is_multi_factor_auth_enabled,json=isMultiFactorAuthEnabled,proto3" json:"is_multi_factor_auth_enabled,omitempty"` - // OAuth2 authorization-code flow state echoed back via c_hash. - State string `protobuf:"bytes,16,opt,name=state,proto3" json:"state,omitempty"` - AppData *v1.AppData `protobuf:"bytes,17,opt,name=app_data,json=appData,proto3" json:"app_data,omitempty"` -} - -func (x *CreateUserRequest) Reset() { - *x = CreateUserRequest{} - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateUserRequest) ProtoMessage() {} - -func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead. -func (*CreateUserRequest) Descriptor() ([]byte, []int) { - return file_authorizer_user_v1_user_service_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateUserRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *CreateUserRequest) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *CreateUserRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *CreateUserRequest) GetConfirmPassword() string { - if x != nil { - return x.ConfirmPassword - } - return "" -} - -func (x *CreateUserRequest) GetGivenName() string { - if x != nil { - return x.GivenName - } - return "" -} - -func (x *CreateUserRequest) GetFamilyName() string { - if x != nil { - return x.FamilyName - } - return "" -} - -func (x *CreateUserRequest) GetMiddleName() string { - if x != nil { - return x.MiddleName - } - return "" -} - -func (x *CreateUserRequest) GetNickname() string { - if x != nil { - return x.Nickname - } - return "" -} - -func (x *CreateUserRequest) GetGender() string { - if x != nil { - return x.Gender - } - return "" -} - -func (x *CreateUserRequest) GetBirthdate() string { - if x != nil { - return x.Birthdate - } - return "" -} - -func (x *CreateUserRequest) GetPicture() string { - if x != nil { - return x.Picture - } - return "" -} - -func (x *CreateUserRequest) GetRoles() []string { - if x != nil { - return x.Roles - } - return nil -} - -func (x *CreateUserRequest) GetScope() []string { - if x != nil { - return x.Scope - } - return nil -} - -func (x *CreateUserRequest) GetRedirectUri() string { - if x != nil { - return x.RedirectUri - } - return "" -} - -func (x *CreateUserRequest) GetIsMultiFactorAuthEnabled() bool { - if x != nil { - return x.IsMultiFactorAuthEnabled - } - return false -} - -func (x *CreateUserRequest) GetState() string { - if x != nil { - return x.State - } - return "" -} - -func (x *CreateUserRequest) GetAppData() *v1.AppData { - if x != nil { - return x.AppData - } - return nil -} - -type CreateUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Human-readable message describing the outcome (e.g. "Verification email - // sent" vs "Signed up successfully"). - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - ShouldShowEmailOtpScreen bool `protobuf:"varint,2,opt,name=should_show_email_otp_screen,json=shouldShowEmailOtpScreen,proto3" json:"should_show_email_otp_screen,omitempty"` - ShouldShowMobileOtpScreen bool `protobuf:"varint,3,opt,name=should_show_mobile_otp_screen,json=shouldShowMobileOtpScreen,proto3" json:"should_show_mobile_otp_screen,omitempty"` - ShouldShowTotpScreen bool `protobuf:"varint,4,opt,name=should_show_totp_screen,json=shouldShowTotpScreen,proto3" json:"should_show_totp_screen,omitempty"` - AccessToken string `protobuf:"bytes,5,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` - IdToken string `protobuf:"bytes,6,opt,name=id_token,json=idToken,proto3" json:"id_token,omitempty"` - RefreshToken string `protobuf:"bytes,7,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` - ExpiresIn int64 `protobuf:"varint,8,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` - User *User `protobuf:"bytes,9,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *CreateUserResponse) Reset() { - *x = CreateUserResponse{} - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateUserResponse) ProtoMessage() {} - -func (x *CreateUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead. -func (*CreateUserResponse) Descriptor() ([]byte, []int) { - return file_authorizer_user_v1_user_service_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateUserResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *CreateUserResponse) GetShouldShowEmailOtpScreen() bool { - if x != nil { - return x.ShouldShowEmailOtpScreen - } - return false -} - -func (x *CreateUserResponse) GetShouldShowMobileOtpScreen() bool { - if x != nil { - return x.ShouldShowMobileOtpScreen - } - return false -} - -func (x *CreateUserResponse) GetShouldShowTotpScreen() bool { - if x != nil { - return x.ShouldShowTotpScreen - } - return false -} - -func (x *CreateUserResponse) GetAccessToken() string { - if x != nil { - return x.AccessToken - } - return "" -} - -func (x *CreateUserResponse) GetIdToken() string { - if x != nil { - return x.IdToken - } - return "" -} - -func (x *CreateUserResponse) GetRefreshToken() string { - if x != nil { - return x.RefreshToken - } - return "" -} - -func (x *CreateUserResponse) GetExpiresIn() int64 { - if x != nil { - return x.ExpiresIn - } - return 0 -} - -func (x *CreateUserResponse) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type GetUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Must be "users/me" on this v1 surface. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *GetUserRequest) Reset() { - *x = GetUserRequest{} - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserRequest) ProtoMessage() {} - -func (x *GetUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead. -func (*GetUserRequest) Descriptor() ([]byte, []int) { - return file_authorizer_user_v1_user_service_proto_rawDescGZIP(), []int{2} -} - -func (x *GetUserRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type GetUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *GetUserResponse) Reset() { - *x = GetUserResponse{} - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserResponse) ProtoMessage() {} - -func (x *GetUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead. -func (*GetUserResponse) Descriptor() ([]byte, []int) { - return file_authorizer_user_v1_user_service_proto_rawDescGZIP(), []int{3} -} - -func (x *GetUserResponse) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type UpdateUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The user to update. user.id should be "users/me" or omitted. - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` - // Optional credential change. Validated cross-field by the handler. - OldPassword string `protobuf:"bytes,3,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"` - NewPassword string `protobuf:"bytes,4,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` - ConfirmNewPassword string `protobuf:"bytes,5,opt,name=confirm_new_password,json=confirmNewPassword,proto3" json:"confirm_new_password,omitempty"` -} - -func (x *UpdateUserRequest) Reset() { - *x = UpdateUserRequest{} - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateUserRequest) ProtoMessage() {} - -func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead. -func (*UpdateUserRequest) Descriptor() ([]byte, []int) { - return file_authorizer_user_v1_user_service_proto_rawDescGZIP(), []int{4} -} - -func (x *UpdateUserRequest) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -func (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -func (x *UpdateUserRequest) GetOldPassword() string { - if x != nil { - return x.OldPassword - } - return "" -} - -func (x *UpdateUserRequest) GetNewPassword() string { - if x != nil { - return x.NewPassword - } - return "" -} - -func (x *UpdateUserRequest) GetConfirmNewPassword() string { - if x != nil { - return x.ConfirmNewPassword - } - return "" -} - -type UpdateUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *UpdateUserResponse) Reset() { - *x = UpdateUserResponse{} - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateUserResponse) ProtoMessage() {} - -func (x *UpdateUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateUserResponse.ProtoReflect.Descriptor instead. -func (*UpdateUserResponse) Descriptor() ([]byte, []int) { - return file_authorizer_user_v1_user_service_proto_rawDescGZIP(), []int{5} -} - -func (x *UpdateUserResponse) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -type DeleteUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Must be "users/me" on this v1 surface. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *DeleteUserRequest) Reset() { - *x = DeleteUserRequest{} - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUserRequest) ProtoMessage() {} - -func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead. -func (*DeleteUserRequest) Descriptor() ([]byte, []int) { - return file_authorizer_user_v1_user_service_proto_rawDescGZIP(), []int{6} -} - -func (x *DeleteUserRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type DeleteUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteUserResponse) Reset() { - *x = DeleteUserResponse{} - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUserResponse) ProtoMessage() {} - -func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_user_v1_user_service_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead. -func (*DeleteUserResponse) Descriptor() ([]byte, []int) { - return file_authorizer_user_v1_user_service_proto_rawDescGZIP(), []int{7} -} - -var File_authorizer_user_v1_user_service_proto protoreflect.FileDescriptor - -var file_authorizer_user_v1_user_service_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, - 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xec, 0x04, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x18, 0xc0, 0x02, - 0x60, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, - 0x18, 0x80, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x35, 0x0a, - 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, - 0x18, 0x80, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x72, - 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, - 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, - 0x12, 0x3e, 0x0a, 0x1c, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x66, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x75, 0x74, 0x68, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x61, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, - 0x22, 0x97, 0x03, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x3e, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, 0x68, 0x6f, 0x77, - 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x6f, 0x74, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x65, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x53, - 0x68, 0x6f, 0x77, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4f, 0x74, 0x70, 0x53, 0x63, 0x72, 0x65, 0x65, - 0x6e, 0x12, 0x40, 0x0a, 0x1d, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, 0x68, 0x6f, 0x77, - 0x5f, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x5f, 0x6f, 0x74, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x65, - 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, - 0x53, 0x68, 0x6f, 0x77, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4f, 0x74, 0x70, 0x53, 0x63, 0x72, - 0x65, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x17, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, 0x68, - 0x6f, 0x77, 0x5f, 0x74, 0x6f, 0x74, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x77, - 0x54, 0x6f, 0x74, 0x70, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x19, 0x0a, - 0x08, 0x69, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, - 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, 0x12, 0x2c, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xba, 0x48, 0x1f, 0x72, - 0x1d, 0x32, 0x1b, 0x5e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x28, 0x6d, 0x65, 0x7c, 0x5b, 0x41, - 0x2d, 0x5a, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x2d, 0x5d, 0x2b, 0x29, 0x24, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3f, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0xfe, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, - 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x21, - 0x0a, 0x0c, 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x6c, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x5f, - 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4e, 0x65, 0x77, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x42, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x4b, 0x0a, 0x11, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x36, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xba, - 0x48, 0x1f, 0x72, 0x1d, 0x32, 0x1b, 0x5e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x28, 0x6d, 0x65, - 0x7c, 0x5b, 0x41, 0x2d, 0x5a, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x2d, 0x5d, 0x2b, 0x29, - 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf6, 0x03, - 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x92, 0xb5, 0x18, 0x00, - 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, - 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x6e, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1a, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, - 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x6d, 0x65, 0x12, 0x7b, 0x0a, 0x0a, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x98, 0xb5, 0x18, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x32, 0x0c, 0x2f, 0x76, 0x31, - 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x6d, 0x65, 0x12, 0x7b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x92, 0xb5, 0x18, 0x02, 0x18, 0x01, 0x98, 0xb5, - 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x2a, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x2f, 0x6d, 0x65, 0x42, 0xda, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, - 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x55, - 0x58, 0xaa, 0x02, 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_user_v1_user_service_proto_rawDescOnce sync.Once - file_authorizer_user_v1_user_service_proto_rawDescData = file_authorizer_user_v1_user_service_proto_rawDesc -) - -func file_authorizer_user_v1_user_service_proto_rawDescGZIP() []byte { - file_authorizer_user_v1_user_service_proto_rawDescOnce.Do(func() { - file_authorizer_user_v1_user_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_user_v1_user_service_proto_rawDescData) - }) - return file_authorizer_user_v1_user_service_proto_rawDescData -} - -var file_authorizer_user_v1_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_authorizer_user_v1_user_service_proto_goTypes = []any{ - (*CreateUserRequest)(nil), // 0: authorizer.user.v1.CreateUserRequest - (*CreateUserResponse)(nil), // 1: authorizer.user.v1.CreateUserResponse - (*GetUserRequest)(nil), // 2: authorizer.user.v1.GetUserRequest - (*GetUserResponse)(nil), // 3: authorizer.user.v1.GetUserResponse - (*UpdateUserRequest)(nil), // 4: authorizer.user.v1.UpdateUserRequest - (*UpdateUserResponse)(nil), // 5: authorizer.user.v1.UpdateUserResponse - (*DeleteUserRequest)(nil), // 6: authorizer.user.v1.DeleteUserRequest - (*DeleteUserResponse)(nil), // 7: authorizer.user.v1.DeleteUserResponse - (*v1.AppData)(nil), // 8: authorizer.common.v1.AppData - (*User)(nil), // 9: authorizer.user.v1.User - (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask -} -var file_authorizer_user_v1_user_service_proto_depIdxs = []int32{ - 8, // 0: authorizer.user.v1.CreateUserRequest.app_data:type_name -> authorizer.common.v1.AppData - 9, // 1: authorizer.user.v1.CreateUserResponse.user:type_name -> authorizer.user.v1.User - 9, // 2: authorizer.user.v1.GetUserResponse.user:type_name -> authorizer.user.v1.User - 9, // 3: authorizer.user.v1.UpdateUserRequest.user:type_name -> authorizer.user.v1.User - 10, // 4: authorizer.user.v1.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask - 9, // 5: authorizer.user.v1.UpdateUserResponse.user:type_name -> authorizer.user.v1.User - 0, // 6: authorizer.user.v1.UserService.CreateUser:input_type -> authorizer.user.v1.CreateUserRequest - 2, // 7: authorizer.user.v1.UserService.GetUser:input_type -> authorizer.user.v1.GetUserRequest - 4, // 8: authorizer.user.v1.UserService.UpdateUser:input_type -> authorizer.user.v1.UpdateUserRequest - 6, // 9: authorizer.user.v1.UserService.DeleteUser:input_type -> authorizer.user.v1.DeleteUserRequest - 1, // 10: authorizer.user.v1.UserService.CreateUser:output_type -> authorizer.user.v1.CreateUserResponse - 3, // 11: authorizer.user.v1.UserService.GetUser:output_type -> authorizer.user.v1.GetUserResponse - 5, // 12: authorizer.user.v1.UserService.UpdateUser:output_type -> authorizer.user.v1.UpdateUserResponse - 7, // 13: authorizer.user.v1.UserService.DeleteUser:output_type -> authorizer.user.v1.DeleteUserResponse - 10, // [10:14] is the sub-list for method output_type - 6, // [6:10] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_authorizer_user_v1_user_service_proto_init() } -func file_authorizer_user_v1_user_service_proto_init() { - if File_authorizer_user_v1_user_service_proto != nil { - return - } - file_authorizer_user_v1_user_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_user_v1_user_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_authorizer_user_v1_user_service_proto_goTypes, - DependencyIndexes: file_authorizer_user_v1_user_service_proto_depIdxs, - MessageInfos: file_authorizer_user_v1_user_service_proto_msgTypes, - }.Build() - File_authorizer_user_v1_user_service_proto = out.File - file_authorizer_user_v1_user_service_proto_rawDesc = nil - file_authorizer_user_v1_user_service_proto_goTypes = nil - file_authorizer_user_v1_user_service_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/user/v1/user_service.pb.gw.go b/gen/go/authorizer/user/v1/user_service.pb.gw.go deleted file mode 100644 index dc0298b5..00000000 --- a/gen/go/authorizer/user/v1/user_service.pb.gw.go +++ /dev/null @@ -1,455 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: authorizer/user/v1/user_service.proto - -/* -Package userv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package userv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_UserService_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUserRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_UserService_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUserRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateUser(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_UserService_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetUser(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_UserService_UpdateUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_UserService_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateUserRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.User); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { - if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.User); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } else { - protoReq.UpdateMask = fieldMask - } - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_UpdateUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UpdateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_UserService_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateUserRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.User); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { - if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.User); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } else { - protoReq.UpdateMask = fieldMask - } - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_UpdateUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UpdateUser(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_UserService_DeleteUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_UserService_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUserRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_DeleteUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DeleteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_UserService_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUserRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_DeleteUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DeleteUser(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". -// UnaryRPC :call UserServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error { - - mux.Handle("POST", pattern_UserService_CreateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.user.v1.UserService/CreateUser", runtime.WithHTTPPathPattern("/v1/users")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_UserService_CreateUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_UserService_CreateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.user.v1.UserService/GetUser", runtime.WithHTTPPathPattern("/v1/users/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_UserService_GetUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.user.v1.UserService/UpdateUser", runtime.WithHTTPPathPattern("/v1/users/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_UserService_UpdateUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_UserService_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.user.v1.UserService/DeleteUser", runtime.WithHTTPPathPattern("/v1/users/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_UserService_DeleteUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_UserService_DeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterUserServiceHandler(ctx, mux, conn) -} - -// RegisterUserServiceHandler registers the http handlers for service UserService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterUserServiceHandlerClient(ctx, mux, NewUserServiceClient(conn)) -} - -// RegisterUserServiceHandlerClient registers the http handlers for service UserService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "UserServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error { - - mux.Handle("POST", pattern_UserService_CreateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.user.v1.UserService/CreateUser", runtime.WithHTTPPathPattern("/v1/users")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_UserService_CreateUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_UserService_CreateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.user.v1.UserService/GetUser", runtime.WithHTTPPathPattern("/v1/users/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_UserService_GetUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.user.v1.UserService/UpdateUser", runtime.WithHTTPPathPattern("/v1/users/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_UserService_UpdateUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_UserService_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.user.v1.UserService/DeleteUser", runtime.WithHTTPPathPattern("/v1/users/me")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_UserService_DeleteUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_UserService_DeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_UserService_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "users"}, "")) - - pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "users", "me"}, "")) - - pattern_UserService_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "users", "me"}, "")) - - pattern_UserService_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "users", "me"}, "")) -) - -var ( - forward_UserService_CreateUser_0 = runtime.ForwardResponseMessage - - forward_UserService_GetUser_0 = runtime.ForwardResponseMessage - - forward_UserService_UpdateUser_0 = runtime.ForwardResponseMessage - - forward_UserService_DeleteUser_0 = runtime.ForwardResponseMessage -) diff --git a/gen/go/authorizer/user/v1/user_service_grpc.pb.go b/gen/go/authorizer/user/v1/user_service_grpc.pb.go deleted file mode 100644 index bfd16bc7..00000000 --- a/gen/go/authorizer/user/v1/user_service_grpc.pb.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: authorizer/user/v1/user_service.proto - -package userv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - UserService_CreateUser_FullMethodName = "/authorizer.user.v1.UserService/CreateUser" - UserService_GetUser_FullMethodName = "/authorizer.user.v1.UserService/GetUser" - UserService_UpdateUser_FullMethodName = "/authorizer.user.v1.UserService/UpdateUser" - UserService_DeleteUser_FullMethodName = "/authorizer.user.v1.UserService/DeleteUser" -) - -// UserServiceClient is the client API for UserService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// UserService manages the User resource. Self vs admin is expressed via the -// resource-name pattern: "users/me" refers to the caller; "users/{id}" -// refers to any user (admin-only paths). On this v1 surface only "users/me" -// is exposed — admin operations live on GraphQL. -type UserServiceClient interface { - // CreateUser registers a new user account. Public — requires sign-up - // enabled in server config. On success returns tokens and (for browser - // callers) Set-Cookie headers. - CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) - // GetUser returns a single user. On this surface, only name="users/me" is - // accepted; admin reads remain on GraphQL. - GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) - // UpdateUser patches a user. On this surface, only name="users/me" is - // accepted. The optional field_mask controls which fields are updated. - UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) - // DeleteUser deactivates the caller's account (soft delete). All of the - // user's refresh tokens are revoked as a side effect. OAuth has no - // standard concept of account deactivation — this method is the typed - // equivalent of SCIM `PATCH /Users/{id} {active:false}`. - DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) -} - -type userServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { - return &userServiceClient{cc} -} - -func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateUserResponse) - err := c.cc.Invoke(ctx, UserService_CreateUser_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetUserResponse) - err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(UpdateUserResponse) - err := c.cc.Invoke(ctx, UserService_UpdateUser_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteUserResponse) - err := c.cc.Invoke(ctx, UserService_DeleteUser_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UserServiceServer is the server API for UserService service. -// All implementations should embed UnimplementedUserServiceServer -// for forward compatibility. -// -// UserService manages the User resource. Self vs admin is expressed via the -// resource-name pattern: "users/me" refers to the caller; "users/{id}" -// refers to any user (admin-only paths). On this v1 surface only "users/me" -// is exposed — admin operations live on GraphQL. -type UserServiceServer interface { - // CreateUser registers a new user account. Public — requires sign-up - // enabled in server config. On success returns tokens and (for browser - // callers) Set-Cookie headers. - CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) - // GetUser returns a single user. On this surface, only name="users/me" is - // accepted; admin reads remain on GraphQL. - GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) - // UpdateUser patches a user. On this surface, only name="users/me" is - // accepted. The optional field_mask controls which fields are updated. - UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) - // DeleteUser deactivates the caller's account (soft delete). All of the - // user's refresh tokens are revoked as a side effect. OAuth has no - // standard concept of account deactivation — this method is the typed - // equivalent of SCIM `PATCH /Users/{id} {active:false}`. - DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) -} - -// UnimplementedUserServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedUserServiceServer struct{} - -func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") -} -func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") -} -func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") -} -func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented") -} -func (UnimplementedUserServiceServer) testEmbeddedByValue() {} - -// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to UserServiceServer will -// result in compilation errors. -type UnsafeUserServiceServer interface { - mustEmbedUnimplementedUserServiceServer() -} - -func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) { - // If the following call pancis, it indicates UnimplementedUserServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&UserService_ServiceDesc, srv) -} - -func _UserService_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).CreateUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: UserService_CreateUser_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).CreateUser(ctx, req.(*CreateUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).GetUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: UserService_GetUser_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).UpdateUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: UserService_UpdateUser_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).UpdateUser(ctx, req.(*UpdateUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).DeleteUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: UserService_DeleteUser_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).DeleteUser(ctx, req.(*DeleteUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var UserService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.user.v1.UserService", - HandlerType: (*UserServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateUser", - Handler: _UserService_CreateUser_Handler, - }, - { - MethodName: "GetUser", - Handler: _UserService_GetUser_Handler, - }, - { - MethodName: "UpdateUser", - Handler: _UserService_UpdateUser_Handler, - }, - { - MethodName: "DeleteUser", - Handler: _UserService_DeleteUser_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authorizer/user/v1/user_service.proto", -} diff --git a/gen/go/authorizer/v1/authorizer.pb.go b/gen/go/authorizer/v1/authorizer.pb.go new file mode 100644 index 00000000..4655e9f6 --- /dev/null +++ b/gen/go/authorizer/v1/authorizer.pb.go @@ -0,0 +1,2824 @@ +// Authorizer is the single gRPC service that exposes Authorizer's public +// API. Method names match the GraphQL operation names 1:1 (snake_case in +// GraphQL → PascalCase in proto): Signup, Login, MagicLinkLogin, VerifyEmail, +// ResendVerifyEmail, ForgotPassword, ResetPassword, VerifyOtp, ResendOtp, +// UpdateProfile, DeactivateAccount, Revoke, Meta, Session, Profile, +// ValidateJwtToken, ValidateSession, Permissions, Logout. +// +// Why one service: clients consume a single typed client per language, +// discovery is trivial, and the surface mirrors the GraphQL one users +// already know. The trade-off is that we lose resource-oriented evolution +// (no `List/Get/Create` symmetry per resource) — acceptable for an auth +// surface where most operations are stateless verbs anyway. +// +// REST mapping follows a simple rule: +// - GET /v1/{method} when the request body is empty (Meta, Profile, +// Permissions, Logout) +// - POST /v1/{method} otherwise + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc (unknown) +// source: authorizer/v1/authorizer.proto + +package authorizerv1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SignupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + ConfirmPassword string `protobuf:"bytes,4,opt,name=confirm_password,json=confirmPassword,proto3" json:"confirm_password,omitempty"` + GivenName string `protobuf:"bytes,5,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"` + FamilyName string `protobuf:"bytes,6,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"` + MiddleName string `protobuf:"bytes,7,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"` + Nickname string `protobuf:"bytes,8,opt,name=nickname,proto3" json:"nickname,omitempty"` + Gender string `protobuf:"bytes,9,opt,name=gender,proto3" json:"gender,omitempty"` + Birthdate string `protobuf:"bytes,10,opt,name=birthdate,proto3" json:"birthdate,omitempty"` + Picture string `protobuf:"bytes,11,opt,name=picture,proto3" json:"picture,omitempty"` + Roles []string `protobuf:"bytes,12,rep,name=roles,proto3" json:"roles,omitempty"` + Scope []string `protobuf:"bytes,13,rep,name=scope,proto3" json:"scope,omitempty"` + RedirectUri string `protobuf:"bytes,14,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` + IsMultiFactorAuthEnabled bool `protobuf:"varint,15,opt,name=is_multi_factor_auth_enabled,json=isMultiFactorAuthEnabled,proto3" json:"is_multi_factor_auth_enabled,omitempty"` + State string `protobuf:"bytes,16,opt,name=state,proto3" json:"state,omitempty"` + AppData *v1.AppData `protobuf:"bytes,17,opt,name=app_data,json=appData,proto3" json:"app_data,omitempty"` +} + +func (x *SignupRequest) Reset() { + *x = SignupRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignupRequest) ProtoMessage() {} + +func (x *SignupRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead. +func (*SignupRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{0} +} + +func (x *SignupRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *SignupRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *SignupRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *SignupRequest) GetConfirmPassword() string { + if x != nil { + return x.ConfirmPassword + } + return "" +} + +func (x *SignupRequest) GetGivenName() string { + if x != nil { + return x.GivenName + } + return "" +} + +func (x *SignupRequest) GetFamilyName() string { + if x != nil { + return x.FamilyName + } + return "" +} + +func (x *SignupRequest) GetMiddleName() string { + if x != nil { + return x.MiddleName + } + return "" +} + +func (x *SignupRequest) GetNickname() string { + if x != nil { + return x.Nickname + } + return "" +} + +func (x *SignupRequest) GetGender() string { + if x != nil { + return x.Gender + } + return "" +} + +func (x *SignupRequest) GetBirthdate() string { + if x != nil { + return x.Birthdate + } + return "" +} + +func (x *SignupRequest) GetPicture() string { + if x != nil { + return x.Picture + } + return "" +} + +func (x *SignupRequest) GetRoles() []string { + if x != nil { + return x.Roles + } + return nil +} + +func (x *SignupRequest) GetScope() []string { + if x != nil { + return x.Scope + } + return nil +} + +func (x *SignupRequest) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +func (x *SignupRequest) GetIsMultiFactorAuthEnabled() bool { + if x != nil { + return x.IsMultiFactorAuthEnabled + } + return false +} + +func (x *SignupRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *SignupRequest) GetAppData() *v1.AppData { + if x != nil { + return x.AppData + } + return nil +} + +type SignupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Auth *AuthResponse `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *SignupResponse) Reset() { + *x = SignupResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignupResponse) ProtoMessage() {} + +func (x *SignupResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignupResponse.ProtoReflect.Descriptor instead. +func (*SignupResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{1} +} + +func (x *SignupResponse) GetAuth() *AuthResponse { + if x != nil { + return x.Auth + } + return nil +} + +type LoginRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + Roles []string `protobuf:"bytes,4,rep,name=roles,proto3" json:"roles,omitempty"` + Scope []string `protobuf:"bytes,5,rep,name=scope,proto3" json:"scope,omitempty"` + State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` +} + +func (x *LoginRequest) Reset() { + *x = LoginRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoginRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoginRequest) ProtoMessage() {} + +func (x *LoginRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead. +func (*LoginRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{2} +} + +func (x *LoginRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *LoginRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *LoginRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *LoginRequest) GetRoles() []string { + if x != nil { + return x.Roles + } + return nil +} + +func (x *LoginRequest) GetScope() []string { + if x != nil { + return x.Scope + } + return nil +} + +func (x *LoginRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +type LoginResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Auth *AuthResponse `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *LoginResponse) Reset() { + *x = LoginResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoginResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoginResponse) ProtoMessage() {} + +func (x *LoginResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead. +func (*LoginResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{3} +} + +func (x *LoginResponse) GetAuth() *AuthResponse { + if x != nil { + return x.Auth + } + return nil +} + +type LogoutRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LogoutRequest) Reset() { + *x = LogoutRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LogoutRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogoutRequest) ProtoMessage() {} + +func (x *LogoutRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead. +func (*LogoutRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{4} +} + +type LogoutResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *LogoutResponse) Reset() { + *x = LogoutResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LogoutResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogoutResponse) ProtoMessage() {} + +func (x *LogoutResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead. +func (*LogoutResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{5} +} + +func (x *LogoutResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type MagicLinkLoginRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Roles []string `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` + Scope []string `protobuf:"bytes,3,rep,name=scope,proto3" json:"scope,omitempty"` + State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` + RedirectUri string `protobuf:"bytes,5,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` +} + +func (x *MagicLinkLoginRequest) Reset() { + *x = MagicLinkLoginRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MagicLinkLoginRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MagicLinkLoginRequest) ProtoMessage() {} + +func (x *MagicLinkLoginRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MagicLinkLoginRequest.ProtoReflect.Descriptor instead. +func (*MagicLinkLoginRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{6} +} + +func (x *MagicLinkLoginRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *MagicLinkLoginRequest) GetRoles() []string { + if x != nil { + return x.Roles + } + return nil +} + +func (x *MagicLinkLoginRequest) GetScope() []string { + if x != nil { + return x.Scope + } + return nil +} + +func (x *MagicLinkLoginRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *MagicLinkLoginRequest) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +type MagicLinkLoginResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *MagicLinkLoginResponse) Reset() { + *x = MagicLinkLoginResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MagicLinkLoginResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MagicLinkLoginResponse) ProtoMessage() {} + +func (x *MagicLinkLoginResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MagicLinkLoginResponse.ProtoReflect.Descriptor instead. +func (*MagicLinkLoginResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{7} +} + +func (x *MagicLinkLoginResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type VerifyEmailRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` +} + +func (x *VerifyEmailRequest) Reset() { + *x = VerifyEmailRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifyEmailRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyEmailRequest) ProtoMessage() {} + +func (x *VerifyEmailRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyEmailRequest.ProtoReflect.Descriptor instead. +func (*VerifyEmailRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{8} +} + +func (x *VerifyEmailRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *VerifyEmailRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +type VerifyEmailResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Auth *AuthResponse `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *VerifyEmailResponse) Reset() { + *x = VerifyEmailResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifyEmailResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyEmailResponse) ProtoMessage() {} + +func (x *VerifyEmailResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyEmailResponse.ProtoReflect.Descriptor instead. +func (*VerifyEmailResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{9} +} + +func (x *VerifyEmailResponse) GetAuth() *AuthResponse { + if x != nil { + return x.Auth + } + return nil +} + +type ResendVerifyEmailRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` +} + +func (x *ResendVerifyEmailRequest) Reset() { + *x = ResendVerifyEmailRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResendVerifyEmailRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResendVerifyEmailRequest) ProtoMessage() {} + +func (x *ResendVerifyEmailRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResendVerifyEmailRequest.ProtoReflect.Descriptor instead. +func (*ResendVerifyEmailRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{10} +} + +func (x *ResendVerifyEmailRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ResendVerifyEmailRequest) GetIdentifier() string { + if x != nil { + return x.Identifier + } + return "" +} + +func (x *ResendVerifyEmailRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +type ResendVerifyEmailResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ResendVerifyEmailResponse) Reset() { + *x = ResendVerifyEmailResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResendVerifyEmailResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResendVerifyEmailResponse) ProtoMessage() {} + +func (x *ResendVerifyEmailResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResendVerifyEmailResponse.ProtoReflect.Descriptor instead. +func (*ResendVerifyEmailResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{11} +} + +func (x *ResendVerifyEmailResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type VerifyOtpRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Exactly one of email / phone_number is required. + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Otp string `protobuf:"bytes,3,opt,name=otp,proto3" json:"otp,omitempty"` + IsTotp bool `protobuf:"varint,4,opt,name=is_totp,json=isTotp,proto3" json:"is_totp,omitempty"` + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` +} + +func (x *VerifyOtpRequest) Reset() { + *x = VerifyOtpRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifyOtpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyOtpRequest) ProtoMessage() {} + +func (x *VerifyOtpRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyOtpRequest.ProtoReflect.Descriptor instead. +func (*VerifyOtpRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{12} +} + +func (x *VerifyOtpRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *VerifyOtpRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *VerifyOtpRequest) GetOtp() string { + if x != nil { + return x.Otp + } + return "" +} + +func (x *VerifyOtpRequest) GetIsTotp() bool { + if x != nil { + return x.IsTotp + } + return false +} + +func (x *VerifyOtpRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +type VerifyOtpResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Auth *AuthResponse `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *VerifyOtpResponse) Reset() { + *x = VerifyOtpResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifyOtpResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyOtpResponse) ProtoMessage() {} + +func (x *VerifyOtpResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyOtpResponse.ProtoReflect.Descriptor instead. +func (*VerifyOtpResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{13} +} + +func (x *VerifyOtpResponse) GetAuth() *AuthResponse { + if x != nil { + return x.Auth + } + return nil +} + +type ResendOtpRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` +} + +func (x *ResendOtpRequest) Reset() { + *x = ResendOtpRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResendOtpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResendOtpRequest) ProtoMessage() {} + +func (x *ResendOtpRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResendOtpRequest.ProtoReflect.Descriptor instead. +func (*ResendOtpRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{14} +} + +func (x *ResendOtpRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ResendOtpRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *ResendOtpRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +type ResendOtpResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ResendOtpResponse) Reset() { + *x = ResendOtpResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResendOtpResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResendOtpResponse) ProtoMessage() {} + +func (x *ResendOtpResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResendOtpResponse.ProtoReflect.Descriptor instead. +func (*ResendOtpResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{15} +} + +func (x *ResendOtpResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type ForgotPasswordRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + RedirectUri string `protobuf:"bytes,4,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` +} + +func (x *ForgotPasswordRequest) Reset() { + *x = ForgotPasswordRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ForgotPasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForgotPasswordRequest) ProtoMessage() {} + +func (x *ForgotPasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ForgotPasswordRequest.ProtoReflect.Descriptor instead. +func (*ForgotPasswordRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{16} +} + +func (x *ForgotPasswordRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ForgotPasswordRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *ForgotPasswordRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *ForgotPasswordRequest) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +type ForgotPasswordResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // For SMS-driven flows the UI may need to render an OTP entry screen. + ShouldShowMobileOtpScreen bool `protobuf:"varint,2,opt,name=should_show_mobile_otp_screen,json=shouldShowMobileOtpScreen,proto3" json:"should_show_mobile_otp_screen,omitempty"` +} + +func (x *ForgotPasswordResponse) Reset() { + *x = ForgotPasswordResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ForgotPasswordResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForgotPasswordResponse) ProtoMessage() {} + +func (x *ForgotPasswordResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ForgotPasswordResponse.ProtoReflect.Descriptor instead. +func (*ForgotPasswordResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{17} +} + +func (x *ForgotPasswordResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *ForgotPasswordResponse) GetShouldShowMobileOtpScreen() bool { + if x != nil { + return x.ShouldShowMobileOtpScreen + } + return false +} + +type ResetPasswordRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // For email flows: the token from the reset email. For SMS flows: the OTP. + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + Otp string `protobuf:"bytes,2,opt,name=otp,proto3" json:"otp,omitempty"` + PhoneNumber string `protobuf:"bytes,3,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + ConfirmPassword string `protobuf:"bytes,5,opt,name=confirm_password,json=confirmPassword,proto3" json:"confirm_password,omitempty"` +} + +func (x *ResetPasswordRequest) Reset() { + *x = ResetPasswordRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResetPasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResetPasswordRequest) ProtoMessage() {} + +func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead. +func (*ResetPasswordRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{18} +} + +func (x *ResetPasswordRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *ResetPasswordRequest) GetOtp() string { + if x != nil { + return x.Otp + } + return "" +} + +func (x *ResetPasswordRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *ResetPasswordRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *ResetPasswordRequest) GetConfirmPassword() string { + if x != nil { + return x.ConfirmPassword + } + return "" +} + +type ResetPasswordResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ResetPasswordResponse) Reset() { + *x = ResetPasswordResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResetPasswordResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResetPasswordResponse) ProtoMessage() {} + +func (x *ResetPasswordResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResetPasswordResponse.ProtoReflect.Descriptor instead. +func (*ResetPasswordResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{19} +} + +func (x *ResetPasswordResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type ProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ProfileRequest) Reset() { + *x = ProfileRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProfileRequest) ProtoMessage() {} + +func (x *ProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProfileRequest.ProtoReflect.Descriptor instead. +func (*ProfileRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{20} +} + +type ProfileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *ProfileResponse) Reset() { + *x = ProfileResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProfileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProfileResponse) ProtoMessage() {} + +func (x *ProfileResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProfileResponse.ProtoReflect.Descriptor instead. +func (*ProfileResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{21} +} + +func (x *ProfileResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +type UpdateProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OldPassword string `protobuf:"bytes,1,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"` + NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` + ConfirmNewPassword string `protobuf:"bytes,3,opt,name=confirm_new_password,json=confirmNewPassword,proto3" json:"confirm_new_password,omitempty"` + Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` + GivenName string `protobuf:"bytes,5,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"` + FamilyName string `protobuf:"bytes,6,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"` + MiddleName string `protobuf:"bytes,7,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"` + Nickname string `protobuf:"bytes,8,opt,name=nickname,proto3" json:"nickname,omitempty"` + Gender string `protobuf:"bytes,9,opt,name=gender,proto3" json:"gender,omitempty"` + Birthdate string `protobuf:"bytes,10,opt,name=birthdate,proto3" json:"birthdate,omitempty"` + PhoneNumber string `protobuf:"bytes,11,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Picture string `protobuf:"bytes,12,opt,name=picture,proto3" json:"picture,omitempty"` + IsMultiFactorAuthEnabled bool `protobuf:"varint,13,opt,name=is_multi_factor_auth_enabled,json=isMultiFactorAuthEnabled,proto3" json:"is_multi_factor_auth_enabled,omitempty"` + AppData *v1.AppData `protobuf:"bytes,14,opt,name=app_data,json=appData,proto3" json:"app_data,omitempty"` +} + +func (x *UpdateProfileRequest) Reset() { + *x = UpdateProfileRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateProfileRequest) ProtoMessage() {} + +func (x *UpdateProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateProfileRequest.ProtoReflect.Descriptor instead. +func (*UpdateProfileRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{22} +} + +func (x *UpdateProfileRequest) GetOldPassword() string { + if x != nil { + return x.OldPassword + } + return "" +} + +func (x *UpdateProfileRequest) GetNewPassword() string { + if x != nil { + return x.NewPassword + } + return "" +} + +func (x *UpdateProfileRequest) GetConfirmNewPassword() string { + if x != nil { + return x.ConfirmNewPassword + } + return "" +} + +func (x *UpdateProfileRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *UpdateProfileRequest) GetGivenName() string { + if x != nil { + return x.GivenName + } + return "" +} + +func (x *UpdateProfileRequest) GetFamilyName() string { + if x != nil { + return x.FamilyName + } + return "" +} + +func (x *UpdateProfileRequest) GetMiddleName() string { + if x != nil { + return x.MiddleName + } + return "" +} + +func (x *UpdateProfileRequest) GetNickname() string { + if x != nil { + return x.Nickname + } + return "" +} + +func (x *UpdateProfileRequest) GetGender() string { + if x != nil { + return x.Gender + } + return "" +} + +func (x *UpdateProfileRequest) GetBirthdate() string { + if x != nil { + return x.Birthdate + } + return "" +} + +func (x *UpdateProfileRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *UpdateProfileRequest) GetPicture() string { + if x != nil { + return x.Picture + } + return "" +} + +func (x *UpdateProfileRequest) GetIsMultiFactorAuthEnabled() bool { + if x != nil { + return x.IsMultiFactorAuthEnabled + } + return false +} + +func (x *UpdateProfileRequest) GetAppData() *v1.AppData { + if x != nil { + return x.AppData + } + return nil +} + +type UpdateProfileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *UpdateProfileResponse) Reset() { + *x = UpdateProfileResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateProfileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateProfileResponse) ProtoMessage() {} + +func (x *UpdateProfileResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateProfileResponse.ProtoReflect.Descriptor instead. +func (*UpdateProfileResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{23} +} + +func (x *UpdateProfileResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type DeactivateAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeactivateAccountRequest) Reset() { + *x = DeactivateAccountRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeactivateAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeactivateAccountRequest) ProtoMessage() {} + +func (x *DeactivateAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeactivateAccountRequest.ProtoReflect.Descriptor instead. +func (*DeactivateAccountRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{24} +} + +type DeactivateAccountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *DeactivateAccountResponse) Reset() { + *x = DeactivateAccountResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeactivateAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeactivateAccountResponse) ProtoMessage() {} + +func (x *DeactivateAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeactivateAccountResponse.ProtoReflect.Descriptor instead. +func (*DeactivateAccountResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{25} +} + +func (x *DeactivateAccountResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type RevokeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` +} + +func (x *RevokeRequest) Reset() { + *x = RevokeRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevokeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeRequest) ProtoMessage() {} + +func (x *RevokeRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeRequest.ProtoReflect.Descriptor instead. +func (*RevokeRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{26} +} + +func (x *RevokeRequest) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +type RevokeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *RevokeResponse) Reset() { + *x = RevokeResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevokeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeResponse) ProtoMessage() {} + +func (x *RevokeResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeResponse.ProtoReflect.Descriptor instead. +func (*RevokeResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{27} +} + +func (x *RevokeResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type SessionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Roles []string `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"` + Scope []string `protobuf:"bytes,2,rep,name=scope,proto3" json:"scope,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + // Optional AND-combined permission filter; deny if any is missing. + RequiredPermissions []*PermissionInput `protobuf:"bytes,4,rep,name=required_permissions,json=requiredPermissions,proto3" json:"required_permissions,omitempty"` +} + +func (x *SessionRequest) Reset() { + *x = SessionRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionRequest) ProtoMessage() {} + +func (x *SessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionRequest.ProtoReflect.Descriptor instead. +func (*SessionRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{28} +} + +func (x *SessionRequest) GetRoles() []string { + if x != nil { + return x.Roles + } + return nil +} + +func (x *SessionRequest) GetScope() []string { + if x != nil { + return x.Scope + } + return nil +} + +func (x *SessionRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *SessionRequest) GetRequiredPermissions() []*PermissionInput { + if x != nil { + return x.RequiredPermissions + } + return nil +} + +type SessionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Auth *AuthResponse `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *SessionResponse) Reset() { + *x = SessionResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionResponse) ProtoMessage() {} + +func (x *SessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionResponse.ProtoReflect.Descriptor instead. +func (*SessionResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{29} +} + +func (x *SessionResponse) GetAuth() *AuthResponse { + if x != nil { + return x.Auth + } + return nil +} + +type ValidateJwtTokenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TokenType string `protobuf:"bytes,1,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"` + RequiredPermissions []*PermissionInput `protobuf:"bytes,4,rep,name=required_permissions,json=requiredPermissions,proto3" json:"required_permissions,omitempty"` +} + +func (x *ValidateJwtTokenRequest) Reset() { + *x = ValidateJwtTokenRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateJwtTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateJwtTokenRequest) ProtoMessage() {} + +func (x *ValidateJwtTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateJwtTokenRequest.ProtoReflect.Descriptor instead. +func (*ValidateJwtTokenRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{30} +} + +func (x *ValidateJwtTokenRequest) GetTokenType() string { + if x != nil { + return x.TokenType + } + return "" +} + +func (x *ValidateJwtTokenRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *ValidateJwtTokenRequest) GetRoles() []string { + if x != nil { + return x.Roles + } + return nil +} + +func (x *ValidateJwtTokenRequest) GetRequiredPermissions() []*PermissionInput { + if x != nil { + return x.RequiredPermissions + } + return nil +} + +type ValidateJwtTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` + // Free-form JWT claims (matches GraphQL ValidateJWTTokenResponse.claims). + Claims *v1.AppData `protobuf:"bytes,2,opt,name=claims,proto3" json:"claims,omitempty"` +} + +func (x *ValidateJwtTokenResponse) Reset() { + *x = ValidateJwtTokenResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateJwtTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateJwtTokenResponse) ProtoMessage() {} + +func (x *ValidateJwtTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateJwtTokenResponse.ProtoReflect.Descriptor instead. +func (*ValidateJwtTokenResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{31} +} + +func (x *ValidateJwtTokenResponse) GetIsValid() bool { + if x != nil { + return x.IsValid + } + return false +} + +func (x *ValidateJwtTokenResponse) GetClaims() *v1.AppData { + if x != nil { + return x.Claims + } + return nil +} + +type ValidateSessionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cookie string `protobuf:"bytes,1,opt,name=cookie,proto3" json:"cookie,omitempty"` + Roles []string `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` + RequiredPermissions []*PermissionInput `protobuf:"bytes,3,rep,name=required_permissions,json=requiredPermissions,proto3" json:"required_permissions,omitempty"` +} + +func (x *ValidateSessionRequest) Reset() { + *x = ValidateSessionRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateSessionRequest) ProtoMessage() {} + +func (x *ValidateSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateSessionRequest.ProtoReflect.Descriptor instead. +func (*ValidateSessionRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{32} +} + +func (x *ValidateSessionRequest) GetCookie() string { + if x != nil { + return x.Cookie + } + return "" +} + +func (x *ValidateSessionRequest) GetRoles() []string { + if x != nil { + return x.Roles + } + return nil +} + +func (x *ValidateSessionRequest) GetRequiredPermissions() []*PermissionInput { + if x != nil { + return x.RequiredPermissions + } + return nil +} + +type ValidateSessionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` + User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *ValidateSessionResponse) Reset() { + *x = ValidateSessionResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateSessionResponse) ProtoMessage() {} + +func (x *ValidateSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateSessionResponse.ProtoReflect.Descriptor instead. +func (*ValidateSessionResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{33} +} + +func (x *ValidateSessionResponse) GetIsValid() bool { + if x != nil { + return x.IsValid + } + return false +} + +func (x *ValidateSessionResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +type MetaRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MetaRequest) Reset() { + *x = MetaRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetaRequest) ProtoMessage() {} + +func (x *MetaRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetaRequest.ProtoReflect.Descriptor instead. +func (*MetaRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{34} +} + +type MetaResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (x *MetaResponse) Reset() { + *x = MetaResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MetaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetaResponse) ProtoMessage() {} + +func (x *MetaResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetaResponse.ProtoReflect.Descriptor instead. +func (*MetaResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{35} +} + +func (x *MetaResponse) GetMeta() *Meta { + if x != nil { + return x.Meta + } + return nil +} + +type PermissionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PermissionsRequest) Reset() { + *x = PermissionsRequest{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PermissionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionsRequest) ProtoMessage() {} + +func (x *PermissionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PermissionsRequest.ProtoReflect.Descriptor instead. +func (*PermissionsRequest) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{36} +} + +type PermissionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Permissions []*Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (x *PermissionsResponse) Reset() { + *x = PermissionsResponse{} + mi := &file_authorizer_v1_authorizer_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PermissionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionsResponse) ProtoMessage() {} + +func (x *PermissionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_authorizer_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PermissionsResponse.ProtoReflect.Descriptor instead. +func (*PermissionsResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{37} +} + +func (x *PermissionsResponse) GetPermissions() []*Permission { + if x != nil { + return x.Permissions + } + return nil +} + +var File_authorizer_v1_authorizer_proto protoreflect.FileDescriptor + +var file_authorizer_v1_authorizer_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xe6, 0x04, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, + 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x72, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x67, 0x69, 0x76, 0x65, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, + 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, 0x12, 0x3e, 0x0a, 0x1c, 0x69, 0x73, 0x5f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, + 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x75, 0x74, + 0x68, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x38, + 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x07, 0x61, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x0e, 0x53, 0x69, 0x67, 0x6e, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x61, 0x75, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x22, 0xc4, 0x01, 0x0a, 0x0c, + 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x72, 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x0c, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, + 0x05, 0x10, 0x01, 0x18, 0x80, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x22, 0x40, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x04, + 0x61, 0x75, 0x74, 0x68, 0x22, 0x0f, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2a, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x15, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, + 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x72, + 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, + 0x22, 0x32, 0x0a, 0x16, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x22, 0x49, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, + 0x46, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x22, 0x79, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x65, 0x6e, + 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x12, 0x27, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x22, 0x35, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x10, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, + 0x48, 0x05, 0x72, 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, + 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x03, 0x6f, 0x74, + 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xba, 0x48, 0x06, 0x72, 0x04, 0x10, 0x01, + 0x18, 0x10, 0x52, 0x03, 0x6f, 0x74, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x74, 0x6f, + 0x74, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x54, 0x6f, 0x74, 0x70, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x44, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x4f, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x61, + 0x75, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x22, 0x74, 0x0a, 0x10, + 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, + 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x22, 0x2d, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x15, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, + 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x0c, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, + 0x22, 0x74, 0x0a, 0x16, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x1d, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, + 0x68, 0x6f, 0x77, 0x5f, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x5f, 0x6f, 0x74, 0x70, 0x5f, 0x73, + 0x63, 0x72, 0x65, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x68, 0x6f, + 0x75, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x77, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4f, 0x74, 0x70, + 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0xc9, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x65, 0x74, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x74, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6f, 0x74, 0x70, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, + 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x10, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, + 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x22, 0x31, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x22, 0xb5, 0x04, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x6c, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, + 0x2b, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0x80, 0x01, 0x52, + 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x14, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, + 0x03, 0x18, 0x80, 0x01, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4e, 0x65, 0x77, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0xc0, + 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x76, 0x65, + 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, + 0x76, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x6d, 0x69, 0x6c, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x61, + 0x6d, 0x69, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x69, 0x64, 0x64, + 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, + 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, + 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, + 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, + 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x3e, 0x0a, 0x1c, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x75, 0x74, 0x68, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x38, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x07, 0x61, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x22, 0x31, 0x0a, 0x15, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1a, + 0x0a, 0x18, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x19, 0x44, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0x3d, 0x0a, 0x0d, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x2a, 0x0a, 0x0e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa5, 0x01, 0x0a, + 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x51, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, + 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x42, 0x0a, 0x0f, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x22, 0xc9, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x77, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, + 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, + 0x73, 0x12, 0x51, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, + 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6c, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x4a, 0x77, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x06, 0x63, + 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, + 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, + 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5d, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x27, 0x0a, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x0d, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x37, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x14, + 0x0a, 0x12, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x13, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xe5, 0x11, 0x0a, 0x0a, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x75, + 0x70, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, + 0x92, 0xb5, 0x18, 0x00, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x75, + 0x70, 0x12, 0x64, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x92, 0xb5, 0x18, 0x00, 0x98, 0xb5, 0x18, 0x01, 0xa0, + 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, + 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x5d, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, + 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, + 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, + 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x86, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x67, 0x69, 0x63, + 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, + 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x6d, + 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, + 0x79, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x52, + 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x27, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x26, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, + 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x71, 0x0a, 0x09, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x4f, 0x74, 0x70, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4f, + 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x4f, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x98, 0xb5, 0x18, + 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, + 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x6f, 0x74, 0x70, 0x12, 0x6d, + 0x0a, 0x09, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x12, 0x1f, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, + 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x65, 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, + 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, + 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x74, 0x70, 0x12, 0x81, 0x01, + 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x12, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xa0, + 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, + 0x31, 0x2f, 0x66, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x12, 0x81, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x23, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, + 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, + 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x63, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x12, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x19, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x7d, 0x0a, 0x0d, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x11, 0x44, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x27, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2b, 0x92, 0xb5, 0x18, 0x02, 0x18, 0x01, 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x60, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x12, 0x66, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x92, 0xb5, 0x18, + 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x8a, 0x01, 0x0a, 0x10, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x77, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x77, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, + 0x77, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x25, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, + 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x77, 0x74, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x85, 0x01, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xa0, 0xb5, 0x18, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5b, + 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1a, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x73, 0x0a, 0x0b, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1d, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, + 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0xc0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_authorizer_v1_authorizer_proto_rawDescOnce sync.Once + file_authorizer_v1_authorizer_proto_rawDescData = file_authorizer_v1_authorizer_proto_rawDesc +) + +func file_authorizer_v1_authorizer_proto_rawDescGZIP() []byte { + file_authorizer_v1_authorizer_proto_rawDescOnce.Do(func() { + file_authorizer_v1_authorizer_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_v1_authorizer_proto_rawDescData) + }) + return file_authorizer_v1_authorizer_proto_rawDescData +} + +var file_authorizer_v1_authorizer_proto_msgTypes = make([]protoimpl.MessageInfo, 38) +var file_authorizer_v1_authorizer_proto_goTypes = []any{ + (*SignupRequest)(nil), // 0: authorizer.v1.SignupRequest + (*SignupResponse)(nil), // 1: authorizer.v1.SignupResponse + (*LoginRequest)(nil), // 2: authorizer.v1.LoginRequest + (*LoginResponse)(nil), // 3: authorizer.v1.LoginResponse + (*LogoutRequest)(nil), // 4: authorizer.v1.LogoutRequest + (*LogoutResponse)(nil), // 5: authorizer.v1.LogoutResponse + (*MagicLinkLoginRequest)(nil), // 6: authorizer.v1.MagicLinkLoginRequest + (*MagicLinkLoginResponse)(nil), // 7: authorizer.v1.MagicLinkLoginResponse + (*VerifyEmailRequest)(nil), // 8: authorizer.v1.VerifyEmailRequest + (*VerifyEmailResponse)(nil), // 9: authorizer.v1.VerifyEmailResponse + (*ResendVerifyEmailRequest)(nil), // 10: authorizer.v1.ResendVerifyEmailRequest + (*ResendVerifyEmailResponse)(nil), // 11: authorizer.v1.ResendVerifyEmailResponse + (*VerifyOtpRequest)(nil), // 12: authorizer.v1.VerifyOtpRequest + (*VerifyOtpResponse)(nil), // 13: authorizer.v1.VerifyOtpResponse + (*ResendOtpRequest)(nil), // 14: authorizer.v1.ResendOtpRequest + (*ResendOtpResponse)(nil), // 15: authorizer.v1.ResendOtpResponse + (*ForgotPasswordRequest)(nil), // 16: authorizer.v1.ForgotPasswordRequest + (*ForgotPasswordResponse)(nil), // 17: authorizer.v1.ForgotPasswordResponse + (*ResetPasswordRequest)(nil), // 18: authorizer.v1.ResetPasswordRequest + (*ResetPasswordResponse)(nil), // 19: authorizer.v1.ResetPasswordResponse + (*ProfileRequest)(nil), // 20: authorizer.v1.ProfileRequest + (*ProfileResponse)(nil), // 21: authorizer.v1.ProfileResponse + (*UpdateProfileRequest)(nil), // 22: authorizer.v1.UpdateProfileRequest + (*UpdateProfileResponse)(nil), // 23: authorizer.v1.UpdateProfileResponse + (*DeactivateAccountRequest)(nil), // 24: authorizer.v1.DeactivateAccountRequest + (*DeactivateAccountResponse)(nil), // 25: authorizer.v1.DeactivateAccountResponse + (*RevokeRequest)(nil), // 26: authorizer.v1.RevokeRequest + (*RevokeResponse)(nil), // 27: authorizer.v1.RevokeResponse + (*SessionRequest)(nil), // 28: authorizer.v1.SessionRequest + (*SessionResponse)(nil), // 29: authorizer.v1.SessionResponse + (*ValidateJwtTokenRequest)(nil), // 30: authorizer.v1.ValidateJwtTokenRequest + (*ValidateJwtTokenResponse)(nil), // 31: authorizer.v1.ValidateJwtTokenResponse + (*ValidateSessionRequest)(nil), // 32: authorizer.v1.ValidateSessionRequest + (*ValidateSessionResponse)(nil), // 33: authorizer.v1.ValidateSessionResponse + (*MetaRequest)(nil), // 34: authorizer.v1.MetaRequest + (*MetaResponse)(nil), // 35: authorizer.v1.MetaResponse + (*PermissionsRequest)(nil), // 36: authorizer.v1.PermissionsRequest + (*PermissionsResponse)(nil), // 37: authorizer.v1.PermissionsResponse + (*v1.AppData)(nil), // 38: authorizer.common.v1.AppData + (*AuthResponse)(nil), // 39: authorizer.v1.AuthResponse + (*User)(nil), // 40: authorizer.v1.User + (*PermissionInput)(nil), // 41: authorizer.v1.PermissionInput + (*Meta)(nil), // 42: authorizer.v1.Meta + (*Permission)(nil), // 43: authorizer.v1.Permission +} +var file_authorizer_v1_authorizer_proto_depIdxs = []int32{ + 38, // 0: authorizer.v1.SignupRequest.app_data:type_name -> authorizer.common.v1.AppData + 39, // 1: authorizer.v1.SignupResponse.auth:type_name -> authorizer.v1.AuthResponse + 39, // 2: authorizer.v1.LoginResponse.auth:type_name -> authorizer.v1.AuthResponse + 39, // 3: authorizer.v1.VerifyEmailResponse.auth:type_name -> authorizer.v1.AuthResponse + 39, // 4: authorizer.v1.VerifyOtpResponse.auth:type_name -> authorizer.v1.AuthResponse + 40, // 5: authorizer.v1.ProfileResponse.user:type_name -> authorizer.v1.User + 38, // 6: authorizer.v1.UpdateProfileRequest.app_data:type_name -> authorizer.common.v1.AppData + 41, // 7: authorizer.v1.SessionRequest.required_permissions:type_name -> authorizer.v1.PermissionInput + 39, // 8: authorizer.v1.SessionResponse.auth:type_name -> authorizer.v1.AuthResponse + 41, // 9: authorizer.v1.ValidateJwtTokenRequest.required_permissions:type_name -> authorizer.v1.PermissionInput + 38, // 10: authorizer.v1.ValidateJwtTokenResponse.claims:type_name -> authorizer.common.v1.AppData + 41, // 11: authorizer.v1.ValidateSessionRequest.required_permissions:type_name -> authorizer.v1.PermissionInput + 40, // 12: authorizer.v1.ValidateSessionResponse.user:type_name -> authorizer.v1.User + 42, // 13: authorizer.v1.MetaResponse.meta:type_name -> authorizer.v1.Meta + 43, // 14: authorizer.v1.PermissionsResponse.permissions:type_name -> authorizer.v1.Permission + 0, // 15: authorizer.v1.Authorizer.Signup:input_type -> authorizer.v1.SignupRequest + 2, // 16: authorizer.v1.Authorizer.Login:input_type -> authorizer.v1.LoginRequest + 4, // 17: authorizer.v1.Authorizer.Logout:input_type -> authorizer.v1.LogoutRequest + 6, // 18: authorizer.v1.Authorizer.MagicLinkLogin:input_type -> authorizer.v1.MagicLinkLoginRequest + 8, // 19: authorizer.v1.Authorizer.VerifyEmail:input_type -> authorizer.v1.VerifyEmailRequest + 10, // 20: authorizer.v1.Authorizer.ResendVerifyEmail:input_type -> authorizer.v1.ResendVerifyEmailRequest + 12, // 21: authorizer.v1.Authorizer.VerifyOtp:input_type -> authorizer.v1.VerifyOtpRequest + 14, // 22: authorizer.v1.Authorizer.ResendOtp:input_type -> authorizer.v1.ResendOtpRequest + 16, // 23: authorizer.v1.Authorizer.ForgotPassword:input_type -> authorizer.v1.ForgotPasswordRequest + 18, // 24: authorizer.v1.Authorizer.ResetPassword:input_type -> authorizer.v1.ResetPasswordRequest + 20, // 25: authorizer.v1.Authorizer.Profile:input_type -> authorizer.v1.ProfileRequest + 22, // 26: authorizer.v1.Authorizer.UpdateProfile:input_type -> authorizer.v1.UpdateProfileRequest + 24, // 27: authorizer.v1.Authorizer.DeactivateAccount:input_type -> authorizer.v1.DeactivateAccountRequest + 26, // 28: authorizer.v1.Authorizer.Revoke:input_type -> authorizer.v1.RevokeRequest + 28, // 29: authorizer.v1.Authorizer.Session:input_type -> authorizer.v1.SessionRequest + 30, // 30: authorizer.v1.Authorizer.ValidateJwtToken:input_type -> authorizer.v1.ValidateJwtTokenRequest + 32, // 31: authorizer.v1.Authorizer.ValidateSession:input_type -> authorizer.v1.ValidateSessionRequest + 34, // 32: authorizer.v1.Authorizer.Meta:input_type -> authorizer.v1.MetaRequest + 36, // 33: authorizer.v1.Authorizer.Permissions:input_type -> authorizer.v1.PermissionsRequest + 1, // 34: authorizer.v1.Authorizer.Signup:output_type -> authorizer.v1.SignupResponse + 3, // 35: authorizer.v1.Authorizer.Login:output_type -> authorizer.v1.LoginResponse + 5, // 36: authorizer.v1.Authorizer.Logout:output_type -> authorizer.v1.LogoutResponse + 7, // 37: authorizer.v1.Authorizer.MagicLinkLogin:output_type -> authorizer.v1.MagicLinkLoginResponse + 9, // 38: authorizer.v1.Authorizer.VerifyEmail:output_type -> authorizer.v1.VerifyEmailResponse + 11, // 39: authorizer.v1.Authorizer.ResendVerifyEmail:output_type -> authorizer.v1.ResendVerifyEmailResponse + 13, // 40: authorizer.v1.Authorizer.VerifyOtp:output_type -> authorizer.v1.VerifyOtpResponse + 15, // 41: authorizer.v1.Authorizer.ResendOtp:output_type -> authorizer.v1.ResendOtpResponse + 17, // 42: authorizer.v1.Authorizer.ForgotPassword:output_type -> authorizer.v1.ForgotPasswordResponse + 19, // 43: authorizer.v1.Authorizer.ResetPassword:output_type -> authorizer.v1.ResetPasswordResponse + 21, // 44: authorizer.v1.Authorizer.Profile:output_type -> authorizer.v1.ProfileResponse + 23, // 45: authorizer.v1.Authorizer.UpdateProfile:output_type -> authorizer.v1.UpdateProfileResponse + 25, // 46: authorizer.v1.Authorizer.DeactivateAccount:output_type -> authorizer.v1.DeactivateAccountResponse + 27, // 47: authorizer.v1.Authorizer.Revoke:output_type -> authorizer.v1.RevokeResponse + 29, // 48: authorizer.v1.Authorizer.Session:output_type -> authorizer.v1.SessionResponse + 31, // 49: authorizer.v1.Authorizer.ValidateJwtToken:output_type -> authorizer.v1.ValidateJwtTokenResponse + 33, // 50: authorizer.v1.Authorizer.ValidateSession:output_type -> authorizer.v1.ValidateSessionResponse + 35, // 51: authorizer.v1.Authorizer.Meta:output_type -> authorizer.v1.MetaResponse + 37, // 52: authorizer.v1.Authorizer.Permissions:output_type -> authorizer.v1.PermissionsResponse + 34, // [34:53] is the sub-list for method output_type + 15, // [15:34] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_authorizer_v1_authorizer_proto_init() } +func file_authorizer_v1_authorizer_proto_init() { + if File_authorizer_v1_authorizer_proto != nil { + return + } + file_authorizer_v1_types_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_authorizer_v1_authorizer_proto_rawDesc, + NumEnums: 0, + NumMessages: 38, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_authorizer_v1_authorizer_proto_goTypes, + DependencyIndexes: file_authorizer_v1_authorizer_proto_depIdxs, + MessageInfos: file_authorizer_v1_authorizer_proto_msgTypes, + }.Build() + File_authorizer_v1_authorizer_proto = out.File + file_authorizer_v1_authorizer_proto_rawDesc = nil + file_authorizer_v1_authorizer_proto_goTypes = nil + file_authorizer_v1_authorizer_proto_depIdxs = nil +} diff --git a/gen/go/authorizer/v1/authorizer.pb.gw.go b/gen/go/authorizer/v1/authorizer.pb.gw.go new file mode 100644 index 00000000..ab35c970 --- /dev/null +++ b/gen/go/authorizer/v1/authorizer.pb.gw.go @@ -0,0 +1,1518 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: authorizer/v1/authorizer.proto + +/* +Package authorizerv1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package authorizerv1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_Authorizer_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SignupRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Signup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Signup_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SignupRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Signup(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_Login_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LoginRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Login(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Login_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LoginRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Login(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LogoutRequest + var metadata runtime.ServerMetadata + + msg, err := client.Logout(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Logout_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LogoutRequest + var metadata runtime.ServerMetadata + + msg, err := server.Logout(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_MagicLinkLogin_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MagicLinkLoginRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MagicLinkLogin(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_MagicLinkLogin_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MagicLinkLoginRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MagicLinkLogin(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_VerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq VerifyEmailRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.VerifyEmail(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_VerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq VerifyEmailRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.VerifyEmail(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_ResendVerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResendVerifyEmailRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ResendVerifyEmail(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_ResendVerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResendVerifyEmailRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ResendVerifyEmail(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_VerifyOtp_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq VerifyOtpRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.VerifyOtp(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_VerifyOtp_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq VerifyOtpRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.VerifyOtp(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_ResendOtp_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResendOtpRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ResendOtp(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_ResendOtp_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResendOtpRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ResendOtp(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_ForgotPassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ForgotPasswordRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ForgotPassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_ForgotPassword_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ForgotPasswordRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ForgotPassword(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_ResetPassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResetPasswordRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ResetPassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_ResetPassword_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResetPasswordRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ResetPassword(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_Profile_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ProfileRequest + var metadata runtime.ServerMetadata + + msg, err := client.Profile(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Profile_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ProfileRequest + var metadata runtime.ServerMetadata + + msg, err := server.Profile(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_UpdateProfile_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateProfileRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateProfile(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_UpdateProfile_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateProfileRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateProfile(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_DeactivateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeactivateAccountRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeactivateAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_DeactivateAccount_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeactivateAccountRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeactivateAccount(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_Revoke_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Revoke(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Revoke_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Revoke(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_Session_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SessionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Session(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Session_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SessionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Session(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_ValidateJwtToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ValidateJwtTokenRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ValidateJwtToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_ValidateJwtToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ValidateJwtTokenRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ValidateJwtToken(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_ValidateSession_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ValidateSessionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ValidateSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_ValidateSession_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ValidateSessionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ValidateSession(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_Meta_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MetaRequest + var metadata runtime.ServerMetadata + + msg, err := client.Meta(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Meta_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MetaRequest + var metadata runtime.ServerMetadata + + msg, err := server.Meta(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_Permissions_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PermissionsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Permissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Permissions_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PermissionsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Permissions(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterAuthorizerHandlerServer registers the http handlers for service Authorizer to "mux". +// UnaryRPC :call AuthorizerServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthorizerHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthorizerServer) error { + + mux.Handle("POST", pattern_Authorizer_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Signup", runtime.WithHTTPPathPattern("/v1/signup")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Signup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Signup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Login", runtime.WithHTTPPathPattern("/v1/login")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Login_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Authorizer_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Logout", runtime.WithHTTPPathPattern("/v1/logout")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Logout_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_MagicLinkLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/MagicLinkLogin", runtime.WithHTTPPathPattern("/v1/magic_link_login")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_MagicLinkLogin_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_MagicLinkLogin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_VerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/VerifyEmail", runtime.WithHTTPPathPattern("/v1/verify_email")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_VerifyEmail_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_VerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ResendVerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResendVerifyEmail", runtime.WithHTTPPathPattern("/v1/resend_verify_email")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_ResendVerifyEmail_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ResendVerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_VerifyOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/VerifyOtp", runtime.WithHTTPPathPattern("/v1/verify_otp")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_VerifyOtp_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_VerifyOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ResendOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResendOtp", runtime.WithHTTPPathPattern("/v1/resend_otp")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_ResendOtp_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ResendOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ForgotPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ForgotPassword", runtime.WithHTTPPathPattern("/v1/forgot_password")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_ForgotPassword_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ForgotPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ResetPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResetPassword", runtime.WithHTTPPathPattern("/v1/reset_password")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_ResetPassword_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ResetPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Authorizer_Profile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Profile", runtime.WithHTTPPathPattern("/v1/profile")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Profile_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Profile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_UpdateProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/UpdateProfile", runtime.WithHTTPPathPattern("/v1/update_profile")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_UpdateProfile_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_UpdateProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_DeactivateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/DeactivateAccount", runtime.WithHTTPPathPattern("/v1/deactivate_account")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_DeactivateAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_DeactivateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Revoke_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Revoke", runtime.WithHTTPPathPattern("/v1/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Revoke_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Revoke_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Session_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Session", runtime.WithHTTPPathPattern("/v1/session")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Session_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Session_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ValidateJwtToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ValidateJwtToken", runtime.WithHTTPPathPattern("/v1/validate_jwt_token")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_ValidateJwtToken_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ValidateJwtToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ValidateSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ValidateSession", runtime.WithHTTPPathPattern("/v1/validate_session")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_ValidateSession_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ValidateSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Authorizer_Meta_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Meta", runtime.WithHTTPPathPattern("/v1/meta")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Meta_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Meta_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Authorizer_Permissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Permissions", runtime.WithHTTPPathPattern("/v1/permissions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Permissions_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Permissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterAuthorizerHandlerFromEndpoint is same as RegisterAuthorizerHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAuthorizerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAuthorizerHandler(ctx, mux, conn) +} + +// RegisterAuthorizerHandler registers the http handlers for service Authorizer to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAuthorizerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAuthorizerHandlerClient(ctx, mux, NewAuthorizerClient(conn)) +} + +// RegisterAuthorizerHandlerClient registers the http handlers for service Authorizer +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthorizerClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthorizerClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AuthorizerClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterAuthorizerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthorizerClient) error { + + mux.Handle("POST", pattern_Authorizer_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Signup", runtime.WithHTTPPathPattern("/v1/signup")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Signup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Signup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Login", runtime.WithHTTPPathPattern("/v1/login")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Login_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Authorizer_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Logout", runtime.WithHTTPPathPattern("/v1/logout")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Logout_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_MagicLinkLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/MagicLinkLogin", runtime.WithHTTPPathPattern("/v1/magic_link_login")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_MagicLinkLogin_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_MagicLinkLogin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_VerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/VerifyEmail", runtime.WithHTTPPathPattern("/v1/verify_email")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_VerifyEmail_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_VerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ResendVerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResendVerifyEmail", runtime.WithHTTPPathPattern("/v1/resend_verify_email")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_ResendVerifyEmail_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ResendVerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_VerifyOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/VerifyOtp", runtime.WithHTTPPathPattern("/v1/verify_otp")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_VerifyOtp_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_VerifyOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ResendOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResendOtp", runtime.WithHTTPPathPattern("/v1/resend_otp")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_ResendOtp_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ResendOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ForgotPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ForgotPassword", runtime.WithHTTPPathPattern("/v1/forgot_password")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_ForgotPassword_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ForgotPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ResetPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResetPassword", runtime.WithHTTPPathPattern("/v1/reset_password")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_ResetPassword_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ResetPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Authorizer_Profile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Profile", runtime.WithHTTPPathPattern("/v1/profile")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Profile_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Profile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_UpdateProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/UpdateProfile", runtime.WithHTTPPathPattern("/v1/update_profile")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_UpdateProfile_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_UpdateProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_DeactivateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/DeactivateAccount", runtime.WithHTTPPathPattern("/v1/deactivate_account")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_DeactivateAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_DeactivateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Revoke_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Revoke", runtime.WithHTTPPathPattern("/v1/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Revoke_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Revoke_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Session_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Session", runtime.WithHTTPPathPattern("/v1/session")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Session_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Session_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ValidateJwtToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ValidateJwtToken", runtime.WithHTTPPathPattern("/v1/validate_jwt_token")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_ValidateJwtToken_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ValidateJwtToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_ValidateSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ValidateSession", runtime.WithHTTPPathPattern("/v1/validate_session")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_ValidateSession_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_ValidateSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Authorizer_Meta_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Meta", runtime.WithHTTPPathPattern("/v1/meta")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Meta_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Meta_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Authorizer_Permissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Permissions", runtime.WithHTTPPathPattern("/v1/permissions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Permissions_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Permissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Authorizer_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "signup"}, "")) + + pattern_Authorizer_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "login"}, "")) + + pattern_Authorizer_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "logout"}, "")) + + pattern_Authorizer_MagicLinkLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "magic_link_login"}, "")) + + pattern_Authorizer_VerifyEmail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "verify_email"}, "")) + + pattern_Authorizer_ResendVerifyEmail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "resend_verify_email"}, "")) + + pattern_Authorizer_VerifyOtp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "verify_otp"}, "")) + + pattern_Authorizer_ResendOtp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "resend_otp"}, "")) + + pattern_Authorizer_ForgotPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "forgot_password"}, "")) + + pattern_Authorizer_ResetPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "reset_password"}, "")) + + pattern_Authorizer_Profile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "profile"}, "")) + + pattern_Authorizer_UpdateProfile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "update_profile"}, "")) + + pattern_Authorizer_DeactivateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "deactivate_account"}, "")) + + pattern_Authorizer_Revoke_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "revoke"}, "")) + + pattern_Authorizer_Session_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "session"}, "")) + + pattern_Authorizer_ValidateJwtToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "validate_jwt_token"}, "")) + + pattern_Authorizer_ValidateSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "validate_session"}, "")) + + pattern_Authorizer_Meta_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "meta"}, "")) + + pattern_Authorizer_Permissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "permissions"}, "")) +) + +var ( + forward_Authorizer_Signup_0 = runtime.ForwardResponseMessage + + forward_Authorizer_Login_0 = runtime.ForwardResponseMessage + + forward_Authorizer_Logout_0 = runtime.ForwardResponseMessage + + forward_Authorizer_MagicLinkLogin_0 = runtime.ForwardResponseMessage + + forward_Authorizer_VerifyEmail_0 = runtime.ForwardResponseMessage + + forward_Authorizer_ResendVerifyEmail_0 = runtime.ForwardResponseMessage + + forward_Authorizer_VerifyOtp_0 = runtime.ForwardResponseMessage + + forward_Authorizer_ResendOtp_0 = runtime.ForwardResponseMessage + + forward_Authorizer_ForgotPassword_0 = runtime.ForwardResponseMessage + + forward_Authorizer_ResetPassword_0 = runtime.ForwardResponseMessage + + forward_Authorizer_Profile_0 = runtime.ForwardResponseMessage + + forward_Authorizer_UpdateProfile_0 = runtime.ForwardResponseMessage + + forward_Authorizer_DeactivateAccount_0 = runtime.ForwardResponseMessage + + forward_Authorizer_Revoke_0 = runtime.ForwardResponseMessage + + forward_Authorizer_Session_0 = runtime.ForwardResponseMessage + + forward_Authorizer_ValidateJwtToken_0 = runtime.ForwardResponseMessage + + forward_Authorizer_ValidateSession_0 = runtime.ForwardResponseMessage + + forward_Authorizer_Meta_0 = runtime.ForwardResponseMessage + + forward_Authorizer_Permissions_0 = runtime.ForwardResponseMessage +) diff --git a/gen/go/authorizer/v1/authorizer_grpc.pb.go b/gen/go/authorizer/v1/authorizer_grpc.pb.go new file mode 100644 index 00000000..88157eee --- /dev/null +++ b/gen/go/authorizer/v1/authorizer_grpc.pb.go @@ -0,0 +1,849 @@ +// Authorizer is the single gRPC service that exposes Authorizer's public +// API. Method names match the GraphQL operation names 1:1 (snake_case in +// GraphQL → PascalCase in proto): Signup, Login, MagicLinkLogin, VerifyEmail, +// ResendVerifyEmail, ForgotPassword, ResetPassword, VerifyOtp, ResendOtp, +// UpdateProfile, DeactivateAccount, Revoke, Meta, Session, Profile, +// ValidateJwtToken, ValidateSession, Permissions, Logout. +// +// Why one service: clients consume a single typed client per language, +// discovery is trivial, and the surface mirrors the GraphQL one users +// already know. The trade-off is that we lose resource-oriented evolution +// (no `List/Get/Create` symmetry per resource) — acceptable for an auth +// surface where most operations are stateless verbs anyway. +// +// REST mapping follows a simple rule: +// - GET /v1/{method} when the request body is empty (Meta, Profile, +// Permissions, Logout) +// - POST /v1/{method} otherwise + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: authorizer/v1/authorizer.proto + +package authorizerv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Authorizer_Signup_FullMethodName = "/authorizer.v1.Authorizer/Signup" + Authorizer_Login_FullMethodName = "/authorizer.v1.Authorizer/Login" + Authorizer_Logout_FullMethodName = "/authorizer.v1.Authorizer/Logout" + Authorizer_MagicLinkLogin_FullMethodName = "/authorizer.v1.Authorizer/MagicLinkLogin" + Authorizer_VerifyEmail_FullMethodName = "/authorizer.v1.Authorizer/VerifyEmail" + Authorizer_ResendVerifyEmail_FullMethodName = "/authorizer.v1.Authorizer/ResendVerifyEmail" + Authorizer_VerifyOtp_FullMethodName = "/authorizer.v1.Authorizer/VerifyOtp" + Authorizer_ResendOtp_FullMethodName = "/authorizer.v1.Authorizer/ResendOtp" + Authorizer_ForgotPassword_FullMethodName = "/authorizer.v1.Authorizer/ForgotPassword" + Authorizer_ResetPassword_FullMethodName = "/authorizer.v1.Authorizer/ResetPassword" + Authorizer_Profile_FullMethodName = "/authorizer.v1.Authorizer/Profile" + Authorizer_UpdateProfile_FullMethodName = "/authorizer.v1.Authorizer/UpdateProfile" + Authorizer_DeactivateAccount_FullMethodName = "/authorizer.v1.Authorizer/DeactivateAccount" + Authorizer_Revoke_FullMethodName = "/authorizer.v1.Authorizer/Revoke" + Authorizer_Session_FullMethodName = "/authorizer.v1.Authorizer/Session" + Authorizer_ValidateJwtToken_FullMethodName = "/authorizer.v1.Authorizer/ValidateJwtToken" + Authorizer_ValidateSession_FullMethodName = "/authorizer.v1.Authorizer/ValidateSession" + Authorizer_Meta_FullMethodName = "/authorizer.v1.Authorizer/Meta" + Authorizer_Permissions_FullMethodName = "/authorizer.v1.Authorizer/Permissions" +) + +// AuthorizerClient is the client API for Authorizer service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AuthorizerClient interface { + // Signup registers a new user. Public; requires sign-up enabled in config. + // Returns AuthResponse with tokens + (browser callers) Set-Cookie headers. + Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error) + // Login authenticates with email/phone + password. + Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) + // Logout ends the caller's current session. + Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) + // MagicLinkLogin dispatches a passwordless email link. The clicked link + // hits the existing /verify_email browser handler. + MagicLinkLogin(ctx context.Context, in *MagicLinkLoginRequest, opts ...grpc.CallOption) (*MagicLinkLoginResponse, error) + VerifyEmail(ctx context.Context, in *VerifyEmailRequest, opts ...grpc.CallOption) (*VerifyEmailResponse, error) + ResendVerifyEmail(ctx context.Context, in *ResendVerifyEmailRequest, opts ...grpc.CallOption) (*ResendVerifyEmailResponse, error) + VerifyOtp(ctx context.Context, in *VerifyOtpRequest, opts ...grpc.CallOption) (*VerifyOtpResponse, error) + ResendOtp(ctx context.Context, in *ResendOtpRequest, opts ...grpc.CallOption) (*ResendOtpResponse, error) + ForgotPassword(ctx context.Context, in *ForgotPasswordRequest, opts ...grpc.CallOption) (*ForgotPasswordResponse, error) + ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error) + // Profile returns the authenticated user. + Profile(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (*ProfileResponse, error) + UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*UpdateProfileResponse, error) + // DeactivateAccount soft-deletes the caller's account and revokes all + // refresh tokens as a side effect. OAuth has no concept of account + // deactivation; this is the typed equivalent of SCIM PATCH active=false. + DeactivateAccount(ctx context.Context, in *DeactivateAccountRequest, opts ...grpc.CallOption) (*DeactivateAccountResponse, error) + // Revoke invalidates a refresh token. Typed mirror of RFC 7009. + Revoke(ctx context.Context, in *RevokeRequest, opts ...grpc.CallOption) (*RevokeResponse, error) + // Session returns the AuthResponse bound to the caller's cookie/bearer. + Session(ctx context.Context, in *SessionRequest, opts ...grpc.CallOption) (*SessionResponse, error) + ValidateJwtToken(ctx context.Context, in *ValidateJwtTokenRequest, opts ...grpc.CallOption) (*ValidateJwtTokenResponse, error) + ValidateSession(ctx context.Context, in *ValidateSessionRequest, opts ...grpc.CallOption) (*ValidateSessionResponse, error) + // Meta returns server feature flags. No auth required. + Meta(ctx context.Context, in *MetaRequest, opts ...grpc.CallOption) (*MetaResponse, error) + // Permissions returns the caller's effective (resource, scope) pairs. + Permissions(ctx context.Context, in *PermissionsRequest, opts ...grpc.CallOption) (*PermissionsResponse, error) +} + +type authorizerClient struct { + cc grpc.ClientConnInterface +} + +func NewAuthorizerClient(cc grpc.ClientConnInterface) AuthorizerClient { + return &authorizerClient{cc} +} + +func (c *authorizerClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SignupResponse) + err := c.cc.Invoke(ctx, Authorizer_Signup_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LoginResponse) + err := c.cc.Invoke(ctx, Authorizer_Login_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LogoutResponse) + err := c.cc.Invoke(ctx, Authorizer_Logout_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) MagicLinkLogin(ctx context.Context, in *MagicLinkLoginRequest, opts ...grpc.CallOption) (*MagicLinkLoginResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MagicLinkLoginResponse) + err := c.cc.Invoke(ctx, Authorizer_MagicLinkLogin_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) VerifyEmail(ctx context.Context, in *VerifyEmailRequest, opts ...grpc.CallOption) (*VerifyEmailResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VerifyEmailResponse) + err := c.cc.Invoke(ctx, Authorizer_VerifyEmail_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) ResendVerifyEmail(ctx context.Context, in *ResendVerifyEmailRequest, opts ...grpc.CallOption) (*ResendVerifyEmailResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResendVerifyEmailResponse) + err := c.cc.Invoke(ctx, Authorizer_ResendVerifyEmail_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) VerifyOtp(ctx context.Context, in *VerifyOtpRequest, opts ...grpc.CallOption) (*VerifyOtpResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VerifyOtpResponse) + err := c.cc.Invoke(ctx, Authorizer_VerifyOtp_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) ResendOtp(ctx context.Context, in *ResendOtpRequest, opts ...grpc.CallOption) (*ResendOtpResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResendOtpResponse) + err := c.cc.Invoke(ctx, Authorizer_ResendOtp_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) ForgotPassword(ctx context.Context, in *ForgotPasswordRequest, opts ...grpc.CallOption) (*ForgotPasswordResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ForgotPasswordResponse) + err := c.cc.Invoke(ctx, Authorizer_ForgotPassword_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResetPasswordResponse) + err := c.cc.Invoke(ctx, Authorizer_ResetPassword_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) Profile(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (*ProfileResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ProfileResponse) + err := c.cc.Invoke(ctx, Authorizer_Profile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*UpdateProfileResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateProfileResponse) + err := c.cc.Invoke(ctx, Authorizer_UpdateProfile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) DeactivateAccount(ctx context.Context, in *DeactivateAccountRequest, opts ...grpc.CallOption) (*DeactivateAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeactivateAccountResponse) + err := c.cc.Invoke(ctx, Authorizer_DeactivateAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) Revoke(ctx context.Context, in *RevokeRequest, opts ...grpc.CallOption) (*RevokeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RevokeResponse) + err := c.cc.Invoke(ctx, Authorizer_Revoke_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) Session(ctx context.Context, in *SessionRequest, opts ...grpc.CallOption) (*SessionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SessionResponse) + err := c.cc.Invoke(ctx, Authorizer_Session_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) ValidateJwtToken(ctx context.Context, in *ValidateJwtTokenRequest, opts ...grpc.CallOption) (*ValidateJwtTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ValidateJwtTokenResponse) + err := c.cc.Invoke(ctx, Authorizer_ValidateJwtToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) ValidateSession(ctx context.Context, in *ValidateSessionRequest, opts ...grpc.CallOption) (*ValidateSessionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ValidateSessionResponse) + err := c.cc.Invoke(ctx, Authorizer_ValidateSession_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) Meta(ctx context.Context, in *MetaRequest, opts ...grpc.CallOption) (*MetaResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MetaResponse) + err := c.cc.Invoke(ctx, Authorizer_Meta_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) Permissions(ctx context.Context, in *PermissionsRequest, opts ...grpc.CallOption) (*PermissionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PermissionsResponse) + err := c.cc.Invoke(ctx, Authorizer_Permissions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthorizerServer is the server API for Authorizer service. +// All implementations should embed UnimplementedAuthorizerServer +// for forward compatibility. +type AuthorizerServer interface { + // Signup registers a new user. Public; requires sign-up enabled in config. + // Returns AuthResponse with tokens + (browser callers) Set-Cookie headers. + Signup(context.Context, *SignupRequest) (*SignupResponse, error) + // Login authenticates with email/phone + password. + Login(context.Context, *LoginRequest) (*LoginResponse, error) + // Logout ends the caller's current session. + Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) + // MagicLinkLogin dispatches a passwordless email link. The clicked link + // hits the existing /verify_email browser handler. + MagicLinkLogin(context.Context, *MagicLinkLoginRequest) (*MagicLinkLoginResponse, error) + VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error) + ResendVerifyEmail(context.Context, *ResendVerifyEmailRequest) (*ResendVerifyEmailResponse, error) + VerifyOtp(context.Context, *VerifyOtpRequest) (*VerifyOtpResponse, error) + ResendOtp(context.Context, *ResendOtpRequest) (*ResendOtpResponse, error) + ForgotPassword(context.Context, *ForgotPasswordRequest) (*ForgotPasswordResponse, error) + ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error) + // Profile returns the authenticated user. + Profile(context.Context, *ProfileRequest) (*ProfileResponse, error) + UpdateProfile(context.Context, *UpdateProfileRequest) (*UpdateProfileResponse, error) + // DeactivateAccount soft-deletes the caller's account and revokes all + // refresh tokens as a side effect. OAuth has no concept of account + // deactivation; this is the typed equivalent of SCIM PATCH active=false. + DeactivateAccount(context.Context, *DeactivateAccountRequest) (*DeactivateAccountResponse, error) + // Revoke invalidates a refresh token. Typed mirror of RFC 7009. + Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error) + // Session returns the AuthResponse bound to the caller's cookie/bearer. + Session(context.Context, *SessionRequest) (*SessionResponse, error) + ValidateJwtToken(context.Context, *ValidateJwtTokenRequest) (*ValidateJwtTokenResponse, error) + ValidateSession(context.Context, *ValidateSessionRequest) (*ValidateSessionResponse, error) + // Meta returns server feature flags. No auth required. + Meta(context.Context, *MetaRequest) (*MetaResponse, error) + // Permissions returns the caller's effective (resource, scope) pairs. + Permissions(context.Context, *PermissionsRequest) (*PermissionsResponse, error) +} + +// UnimplementedAuthorizerServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAuthorizerServer struct{} + +func (UnimplementedAuthorizerServer) Signup(context.Context, *SignupRequest) (*SignupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Signup not implemented") +} +func (UnimplementedAuthorizerServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Login not implemented") +} +func (UnimplementedAuthorizerServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Logout not implemented") +} +func (UnimplementedAuthorizerServer) MagicLinkLogin(context.Context, *MagicLinkLoginRequest) (*MagicLinkLoginResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MagicLinkLogin not implemented") +} +func (UnimplementedAuthorizerServer) VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VerifyEmail not implemented") +} +func (UnimplementedAuthorizerServer) ResendVerifyEmail(context.Context, *ResendVerifyEmailRequest) (*ResendVerifyEmailResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResendVerifyEmail not implemented") +} +func (UnimplementedAuthorizerServer) VerifyOtp(context.Context, *VerifyOtpRequest) (*VerifyOtpResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VerifyOtp not implemented") +} +func (UnimplementedAuthorizerServer) ResendOtp(context.Context, *ResendOtpRequest) (*ResendOtpResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResendOtp not implemented") +} +func (UnimplementedAuthorizerServer) ForgotPassword(context.Context, *ForgotPasswordRequest) (*ForgotPasswordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ForgotPassword not implemented") +} +func (UnimplementedAuthorizerServer) ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResetPassword not implemented") +} +func (UnimplementedAuthorizerServer) Profile(context.Context, *ProfileRequest) (*ProfileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Profile not implemented") +} +func (UnimplementedAuthorizerServer) UpdateProfile(context.Context, *UpdateProfileRequest) (*UpdateProfileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateProfile not implemented") +} +func (UnimplementedAuthorizerServer) DeactivateAccount(context.Context, *DeactivateAccountRequest) (*DeactivateAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeactivateAccount not implemented") +} +func (UnimplementedAuthorizerServer) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") +} +func (UnimplementedAuthorizerServer) Session(context.Context, *SessionRequest) (*SessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Session not implemented") +} +func (UnimplementedAuthorizerServer) ValidateJwtToken(context.Context, *ValidateJwtTokenRequest) (*ValidateJwtTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateJwtToken not implemented") +} +func (UnimplementedAuthorizerServer) ValidateSession(context.Context, *ValidateSessionRequest) (*ValidateSessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateSession not implemented") +} +func (UnimplementedAuthorizerServer) Meta(context.Context, *MetaRequest) (*MetaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Meta not implemented") +} +func (UnimplementedAuthorizerServer) Permissions(context.Context, *PermissionsRequest) (*PermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Permissions not implemented") +} +func (UnimplementedAuthorizerServer) testEmbeddedByValue() {} + +// UnsafeAuthorizerServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AuthorizerServer will +// result in compilation errors. +type UnsafeAuthorizerServer interface { + mustEmbedUnimplementedAuthorizerServer() +} + +func RegisterAuthorizerServer(s grpc.ServiceRegistrar, srv AuthorizerServer) { + // If the following call pancis, it indicates UnimplementedAuthorizerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Authorizer_ServiceDesc, srv) +} + +func _Authorizer_Signup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Signup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Signup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Signup(ctx, req.(*SignupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Login(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Login_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Login(ctx, req.(*LoginRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LogoutRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Logout(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Logout_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Logout(ctx, req.(*LogoutRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_MagicLinkLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MagicLinkLoginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).MagicLinkLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_MagicLinkLogin_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).MagicLinkLogin(ctx, req.(*MagicLinkLoginRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_VerifyEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyEmailRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).VerifyEmail(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_VerifyEmail_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).VerifyEmail(ctx, req.(*VerifyEmailRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_ResendVerifyEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResendVerifyEmailRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).ResendVerifyEmail(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_ResendVerifyEmail_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).ResendVerifyEmail(ctx, req.(*ResendVerifyEmailRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_VerifyOtp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyOtpRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).VerifyOtp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_VerifyOtp_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).VerifyOtp(ctx, req.(*VerifyOtpRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_ResendOtp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResendOtpRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).ResendOtp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_ResendOtp_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).ResendOtp(ctx, req.(*ResendOtpRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_ForgotPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ForgotPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).ForgotPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_ForgotPassword_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).ForgotPassword(ctx, req.(*ForgotPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_ResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResetPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).ResetPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_ResetPassword_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).ResetPassword(ctx, req.(*ResetPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_Profile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Profile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Profile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Profile(ctx, req.(*ProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_UpdateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).UpdateProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_UpdateProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).UpdateProfile(ctx, req.(*UpdateProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_DeactivateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeactivateAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).DeactivateAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_DeactivateAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).DeactivateAccount(ctx, req.(*DeactivateAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RevokeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Revoke(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Revoke_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Revoke(ctx, req.(*RevokeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_Session_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Session(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Session_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Session(ctx, req.(*SessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_ValidateJwtToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateJwtTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).ValidateJwtToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_ValidateJwtToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).ValidateJwtToken(ctx, req.(*ValidateJwtTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_ValidateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).ValidateSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_ValidateSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).ValidateSession(ctx, req.(*ValidateSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_Meta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MetaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Meta(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Meta_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Meta(ctx, req.(*MetaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_Permissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Permissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Permissions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Permissions(ctx, req.(*PermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Authorizer_ServiceDesc is the grpc.ServiceDesc for Authorizer service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Authorizer_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "authorizer.v1.Authorizer", + HandlerType: (*AuthorizerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Signup", + Handler: _Authorizer_Signup_Handler, + }, + { + MethodName: "Login", + Handler: _Authorizer_Login_Handler, + }, + { + MethodName: "Logout", + Handler: _Authorizer_Logout_Handler, + }, + { + MethodName: "MagicLinkLogin", + Handler: _Authorizer_MagicLinkLogin_Handler, + }, + { + MethodName: "VerifyEmail", + Handler: _Authorizer_VerifyEmail_Handler, + }, + { + MethodName: "ResendVerifyEmail", + Handler: _Authorizer_ResendVerifyEmail_Handler, + }, + { + MethodName: "VerifyOtp", + Handler: _Authorizer_VerifyOtp_Handler, + }, + { + MethodName: "ResendOtp", + Handler: _Authorizer_ResendOtp_Handler, + }, + { + MethodName: "ForgotPassword", + Handler: _Authorizer_ForgotPassword_Handler, + }, + { + MethodName: "ResetPassword", + Handler: _Authorizer_ResetPassword_Handler, + }, + { + MethodName: "Profile", + Handler: _Authorizer_Profile_Handler, + }, + { + MethodName: "UpdateProfile", + Handler: _Authorizer_UpdateProfile_Handler, + }, + { + MethodName: "DeactivateAccount", + Handler: _Authorizer_DeactivateAccount_Handler, + }, + { + MethodName: "Revoke", + Handler: _Authorizer_Revoke_Handler, + }, + { + MethodName: "Session", + Handler: _Authorizer_Session_Handler, + }, + { + MethodName: "ValidateJwtToken", + Handler: _Authorizer_ValidateJwtToken_Handler, + }, + { + MethodName: "ValidateSession", + Handler: _Authorizer_ValidateSession_Handler, + }, + { + MethodName: "Meta", + Handler: _Authorizer_Meta_Handler, + }, + { + MethodName: "Permissions", + Handler: _Authorizer_Permissions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authorizer/v1/authorizer.proto", +} diff --git a/gen/go/authorizer/v1/types.pb.go b/gen/go/authorizer/v1/types.pb.go new file mode 100644 index 00000000..0a935e3d --- /dev/null +++ b/gen/go/authorizer/v1/types.pb.go @@ -0,0 +1,913 @@ +// Shared message types used by the Authorizer service. Field naming mirrors +// the GraphQL schema 1:1 so REST/gRPC clients see the same shape. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc (unknown) +// source: authorizer/v1/types.proto + +package authorizerv1 + +import ( + v1 "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// User mirrors the GraphQL User type. Returned by Profile and embedded in +// AuthResponse. +type User struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Either email or phone_number is always present. + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + EmailVerified bool `protobuf:"varint,3,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"` + SignupMethods string `protobuf:"bytes,4,opt,name=signup_methods,json=signupMethods,proto3" json:"signup_methods,omitempty"` + GivenName string `protobuf:"bytes,5,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"` + FamilyName string `protobuf:"bytes,6,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"` + MiddleName string `protobuf:"bytes,7,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"` + Nickname string `protobuf:"bytes,8,opt,name=nickname,proto3" json:"nickname,omitempty"` + // Defaults to email when unset. + PreferredUsername string `protobuf:"bytes,9,opt,name=preferred_username,json=preferredUsername,proto3" json:"preferred_username,omitempty"` + Gender string `protobuf:"bytes,10,opt,name=gender,proto3" json:"gender,omitempty"` + Birthdate string `protobuf:"bytes,11,opt,name=birthdate,proto3" json:"birthdate,omitempty"` + PhoneNumber string `protobuf:"bytes,12,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + PhoneNumberVerified bool `protobuf:"varint,13,opt,name=phone_number_verified,json=phoneNumberVerified,proto3" json:"phone_number_verified,omitempty"` + Picture string `protobuf:"bytes,14,opt,name=picture,proto3" json:"picture,omitempty"` + Roles []string `protobuf:"bytes,15,rep,name=roles,proto3" json:"roles,omitempty"` + CreatedAt int64 `protobuf:"varint,16,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt int64 `protobuf:"varint,17,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + RevokedTimestamp int64 `protobuf:"varint,18,opt,name=revoked_timestamp,json=revokedTimestamp,proto3" json:"revoked_timestamp,omitempty"` + IsMultiFactorAuthEnabled bool `protobuf:"varint,19,opt,name=is_multi_factor_auth_enabled,json=isMultiFactorAuthEnabled,proto3" json:"is_multi_factor_auth_enabled,omitempty"` + // Free-form key/value bag — same as GraphQL `app_data: Map`. + AppData *v1.AppData `protobuf:"bytes,20,opt,name=app_data,json=appData,proto3" json:"app_data,omitempty"` +} + +func (x *User) Reset() { + *x = User{} + mi := &file_authorizer_v1_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_types_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_authorizer_v1_types_proto_rawDescGZIP(), []int{0} +} + +func (x *User) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *User) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *User) GetEmailVerified() bool { + if x != nil { + return x.EmailVerified + } + return false +} + +func (x *User) GetSignupMethods() string { + if x != nil { + return x.SignupMethods + } + return "" +} + +func (x *User) GetGivenName() string { + if x != nil { + return x.GivenName + } + return "" +} + +func (x *User) GetFamilyName() string { + if x != nil { + return x.FamilyName + } + return "" +} + +func (x *User) GetMiddleName() string { + if x != nil { + return x.MiddleName + } + return "" +} + +func (x *User) GetNickname() string { + if x != nil { + return x.Nickname + } + return "" +} + +func (x *User) GetPreferredUsername() string { + if x != nil { + return x.PreferredUsername + } + return "" +} + +func (x *User) GetGender() string { + if x != nil { + return x.Gender + } + return "" +} + +func (x *User) GetBirthdate() string { + if x != nil { + return x.Birthdate + } + return "" +} + +func (x *User) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *User) GetPhoneNumberVerified() bool { + if x != nil { + return x.PhoneNumberVerified + } + return false +} + +func (x *User) GetPicture() string { + if x != nil { + return x.Picture + } + return "" +} + +func (x *User) GetRoles() []string { + if x != nil { + return x.Roles + } + return nil +} + +func (x *User) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *User) GetUpdatedAt() int64 { + if x != nil { + return x.UpdatedAt + } + return 0 +} + +func (x *User) GetRevokedTimestamp() int64 { + if x != nil { + return x.RevokedTimestamp + } + return 0 +} + +func (x *User) GetIsMultiFactorAuthEnabled() bool { + if x != nil { + return x.IsMultiFactorAuthEnabled + } + return false +} + +func (x *User) GetAppData() *v1.AppData { + if x != nil { + return x.AppData + } + return nil +} + +// AuthResponse mirrors the GraphQL AuthResponse type. Returned (wrapped) by +// every method that produces a session: Signup, Login, MagicLinkLogin, +// VerifyEmail, VerifyOtp, Session. +type AuthResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + ShouldShowEmailOtpScreen bool `protobuf:"varint,2,opt,name=should_show_email_otp_screen,json=shouldShowEmailOtpScreen,proto3" json:"should_show_email_otp_screen,omitempty"` + ShouldShowMobileOtpScreen bool `protobuf:"varint,3,opt,name=should_show_mobile_otp_screen,json=shouldShowMobileOtpScreen,proto3" json:"should_show_mobile_otp_screen,omitempty"` + ShouldShowTotpScreen bool `protobuf:"varint,4,opt,name=should_show_totp_screen,json=shouldShowTotpScreen,proto3" json:"should_show_totp_screen,omitempty"` + AccessToken string `protobuf:"bytes,5,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + IdToken string `protobuf:"bytes,6,opt,name=id_token,json=idToken,proto3" json:"id_token,omitempty"` + RefreshToken string `protobuf:"bytes,7,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` + ExpiresIn int64 `protobuf:"varint,8,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` + User *User `protobuf:"bytes,9,opt,name=user,proto3" json:"user,omitempty"` + // TOTP enrolment artifacts (populated only when this AuthResponse + // initiates TOTP setup; one-time, never re-shown). + AuthenticatorScannerImage string `protobuf:"bytes,10,opt,name=authenticator_scanner_image,json=authenticatorScannerImage,proto3" json:"authenticator_scanner_image,omitempty"` + AuthenticatorSecret string `protobuf:"bytes,11,opt,name=authenticator_secret,json=authenticatorSecret,proto3" json:"authenticator_secret,omitempty"` + AuthenticatorRecoveryCodes []string `protobuf:"bytes,12,rep,name=authenticator_recovery_codes,json=authenticatorRecoveryCodes,proto3" json:"authenticator_recovery_codes,omitempty"` +} + +func (x *AuthResponse) Reset() { + *x = AuthResponse{} + mi := &file_authorizer_v1_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthResponse) ProtoMessage() {} + +func (x *AuthResponse) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_types_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead. +func (*AuthResponse) Descriptor() ([]byte, []int) { + return file_authorizer_v1_types_proto_rawDescGZIP(), []int{1} +} + +func (x *AuthResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *AuthResponse) GetShouldShowEmailOtpScreen() bool { + if x != nil { + return x.ShouldShowEmailOtpScreen + } + return false +} + +func (x *AuthResponse) GetShouldShowMobileOtpScreen() bool { + if x != nil { + return x.ShouldShowMobileOtpScreen + } + return false +} + +func (x *AuthResponse) GetShouldShowTotpScreen() bool { + if x != nil { + return x.ShouldShowTotpScreen + } + return false +} + +func (x *AuthResponse) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *AuthResponse) GetIdToken() string { + if x != nil { + return x.IdToken + } + return "" +} + +func (x *AuthResponse) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +func (x *AuthResponse) GetExpiresIn() int64 { + if x != nil { + return x.ExpiresIn + } + return 0 +} + +func (x *AuthResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +func (x *AuthResponse) GetAuthenticatorScannerImage() string { + if x != nil { + return x.AuthenticatorScannerImage + } + return "" +} + +func (x *AuthResponse) GetAuthenticatorSecret() string { + if x != nil { + return x.AuthenticatorSecret + } + return "" +} + +func (x *AuthResponse) GetAuthenticatorRecoveryCodes() []string { + if x != nil { + return x.AuthenticatorRecoveryCodes + } + return nil +} + +// Permission is one (resource, scope) pair the caller is allowed to act on. +type Permission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` +} + +func (x *Permission) Reset() { + *x = Permission{} + mi := &file_authorizer_v1_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Permission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Permission) ProtoMessage() {} + +func (x *Permission) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_types_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Permission.ProtoReflect.Descriptor instead. +func (*Permission) Descriptor() ([]byte, []int) { + return file_authorizer_v1_types_proto_rawDescGZIP(), []int{2} +} + +func (x *Permission) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *Permission) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +// PermissionInput is the request-side mirror of Permission used by +// methods that take a list of required permissions. +type PermissionInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` +} + +func (x *PermissionInput) Reset() { + *x = PermissionInput{} + mi := &file_authorizer_v1_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PermissionInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionInput) ProtoMessage() {} + +func (x *PermissionInput) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_types_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PermissionInput.ProtoReflect.Descriptor instead. +func (*PermissionInput) Descriptor() ([]byte, []int) { + return file_authorizer_v1_types_proto_rawDescGZIP(), []int{3} +} + +func (x *PermissionInput) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *PermissionInput) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +// Meta mirrors the GraphQL Meta type — server feature flags + provider +// availability, returned by the Meta query. +type Meta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + IsGoogleLoginEnabled bool `protobuf:"varint,3,opt,name=is_google_login_enabled,json=isGoogleLoginEnabled,proto3" json:"is_google_login_enabled,omitempty"` + IsFacebookLoginEnabled bool `protobuf:"varint,4,opt,name=is_facebook_login_enabled,json=isFacebookLoginEnabled,proto3" json:"is_facebook_login_enabled,omitempty"` + IsGithubLoginEnabled bool `protobuf:"varint,5,opt,name=is_github_login_enabled,json=isGithubLoginEnabled,proto3" json:"is_github_login_enabled,omitempty"` + IsLinkedinLoginEnabled bool `protobuf:"varint,6,opt,name=is_linkedin_login_enabled,json=isLinkedinLoginEnabled,proto3" json:"is_linkedin_login_enabled,omitempty"` + IsAppleLoginEnabled bool `protobuf:"varint,7,opt,name=is_apple_login_enabled,json=isAppleLoginEnabled,proto3" json:"is_apple_login_enabled,omitempty"` + IsDiscordLoginEnabled bool `protobuf:"varint,8,opt,name=is_discord_login_enabled,json=isDiscordLoginEnabled,proto3" json:"is_discord_login_enabled,omitempty"` + IsTwitterLoginEnabled bool `protobuf:"varint,9,opt,name=is_twitter_login_enabled,json=isTwitterLoginEnabled,proto3" json:"is_twitter_login_enabled,omitempty"` + IsMicrosoftLoginEnabled bool `protobuf:"varint,10,opt,name=is_microsoft_login_enabled,json=isMicrosoftLoginEnabled,proto3" json:"is_microsoft_login_enabled,omitempty"` + IsTwitchLoginEnabled bool `protobuf:"varint,11,opt,name=is_twitch_login_enabled,json=isTwitchLoginEnabled,proto3" json:"is_twitch_login_enabled,omitempty"` + IsRobloxLoginEnabled bool `protobuf:"varint,12,opt,name=is_roblox_login_enabled,json=isRobloxLoginEnabled,proto3" json:"is_roblox_login_enabled,omitempty"` + IsEmailVerificationEnabled bool `protobuf:"varint,13,opt,name=is_email_verification_enabled,json=isEmailVerificationEnabled,proto3" json:"is_email_verification_enabled,omitempty"` + IsBasicAuthenticationEnabled bool `protobuf:"varint,14,opt,name=is_basic_authentication_enabled,json=isBasicAuthenticationEnabled,proto3" json:"is_basic_authentication_enabled,omitempty"` + IsMagicLinkLoginEnabled bool `protobuf:"varint,15,opt,name=is_magic_link_login_enabled,json=isMagicLinkLoginEnabled,proto3" json:"is_magic_link_login_enabled,omitempty"` + IsSignUpEnabled bool `protobuf:"varint,16,opt,name=is_sign_up_enabled,json=isSignUpEnabled,proto3" json:"is_sign_up_enabled,omitempty"` + IsStrongPasswordEnabled bool `protobuf:"varint,17,opt,name=is_strong_password_enabled,json=isStrongPasswordEnabled,proto3" json:"is_strong_password_enabled,omitempty"` + IsMultiFactorAuthEnabled bool `protobuf:"varint,18,opt,name=is_multi_factor_auth_enabled,json=isMultiFactorAuthEnabled,proto3" json:"is_multi_factor_auth_enabled,omitempty"` + IsMobileBasicAuthenticationEnabled bool `protobuf:"varint,19,opt,name=is_mobile_basic_authentication_enabled,json=isMobileBasicAuthenticationEnabled,proto3" json:"is_mobile_basic_authentication_enabled,omitempty"` + IsPhoneVerificationEnabled bool `protobuf:"varint,20,opt,name=is_phone_verification_enabled,json=isPhoneVerificationEnabled,proto3" json:"is_phone_verification_enabled,omitempty"` +} + +func (x *Meta) Reset() { + *x = Meta{} + mi := &file_authorizer_v1_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Meta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Meta) ProtoMessage() {} + +func (x *Meta) ProtoReflect() protoreflect.Message { + mi := &file_authorizer_v1_types_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Meta.ProtoReflect.Descriptor instead. +func (*Meta) Descriptor() ([]byte, []int) { + return file_authorizer_v1_types_proto_rawDescGZIP(), []int{4} +} + +func (x *Meta) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Meta) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *Meta) GetIsGoogleLoginEnabled() bool { + if x != nil { + return x.IsGoogleLoginEnabled + } + return false +} + +func (x *Meta) GetIsFacebookLoginEnabled() bool { + if x != nil { + return x.IsFacebookLoginEnabled + } + return false +} + +func (x *Meta) GetIsGithubLoginEnabled() bool { + if x != nil { + return x.IsGithubLoginEnabled + } + return false +} + +func (x *Meta) GetIsLinkedinLoginEnabled() bool { + if x != nil { + return x.IsLinkedinLoginEnabled + } + return false +} + +func (x *Meta) GetIsAppleLoginEnabled() bool { + if x != nil { + return x.IsAppleLoginEnabled + } + return false +} + +func (x *Meta) GetIsDiscordLoginEnabled() bool { + if x != nil { + return x.IsDiscordLoginEnabled + } + return false +} + +func (x *Meta) GetIsTwitterLoginEnabled() bool { + if x != nil { + return x.IsTwitterLoginEnabled + } + return false +} + +func (x *Meta) GetIsMicrosoftLoginEnabled() bool { + if x != nil { + return x.IsMicrosoftLoginEnabled + } + return false +} + +func (x *Meta) GetIsTwitchLoginEnabled() bool { + if x != nil { + return x.IsTwitchLoginEnabled + } + return false +} + +func (x *Meta) GetIsRobloxLoginEnabled() bool { + if x != nil { + return x.IsRobloxLoginEnabled + } + return false +} + +func (x *Meta) GetIsEmailVerificationEnabled() bool { + if x != nil { + return x.IsEmailVerificationEnabled + } + return false +} + +func (x *Meta) GetIsBasicAuthenticationEnabled() bool { + if x != nil { + return x.IsBasicAuthenticationEnabled + } + return false +} + +func (x *Meta) GetIsMagicLinkLoginEnabled() bool { + if x != nil { + return x.IsMagicLinkLoginEnabled + } + return false +} + +func (x *Meta) GetIsSignUpEnabled() bool { + if x != nil { + return x.IsSignUpEnabled + } + return false +} + +func (x *Meta) GetIsStrongPasswordEnabled() bool { + if x != nil { + return x.IsStrongPasswordEnabled + } + return false +} + +func (x *Meta) GetIsMultiFactorAuthEnabled() bool { + if x != nil { + return x.IsMultiFactorAuthEnabled + } + return false +} + +func (x *Meta) GetIsMobileBasicAuthenticationEnabled() bool { + if x != nil { + return x.IsMobileBasicAuthenticationEnabled + } + return false +} + +func (x *Meta) GetIsPhoneVerificationEnabled() bool { + if x != nil { + return x.IsPhoneVerificationEnabled + } + return false +} + +var File_authorizer_v1_types_proto protoreflect.FileDescriptor + +var file_authorizer_v1_types_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x05, 0x0a, + 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, + 0x75, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x76, + 0x65, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, + 0x69, 0x76, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x6d, 0x69, + 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x69, 0x64, + 0x64, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, + 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, + 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, + 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, + 0x0a, 0x15, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, + 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, + 0x1c, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x13, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x18, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x41, 0x75, 0x74, 0x68, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x38, 0x0a, + 0x08, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, + 0x61, 0x70, 0x70, 0x44, 0x61, 0x74, 0x61, 0x22, 0xc1, 0x04, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x1c, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, 0x68, 0x6f, + 0x77, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x6f, 0x74, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x65, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, + 0x53, 0x68, 0x6f, 0x77, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4f, 0x74, 0x70, 0x53, 0x63, 0x72, 0x65, + 0x65, 0x6e, 0x12, 0x40, 0x0a, 0x1d, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, 0x68, 0x6f, + 0x77, 0x5f, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x5f, 0x6f, 0x74, 0x70, 0x5f, 0x73, 0x63, 0x72, + 0x65, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x68, 0x6f, 0x75, 0x6c, + 0x64, 0x53, 0x68, 0x6f, 0x77, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4f, 0x74, 0x70, 0x53, 0x63, + 0x72, 0x65, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x17, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x73, + 0x68, 0x6f, 0x77, 0x5f, 0x74, 0x6f, 0x74, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x53, 0x68, 0x6f, + 0x77, 0x54, 0x6f, 0x74, 0x70, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x19, + 0x0a, 0x08, 0x69, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, + 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, 0x12, 0x27, 0x0a, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x5f, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x63, 0x61, 0x6e, 0x6e, 0x65, + 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x6f, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x1c, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x1a, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x3e, 0x0a, 0x0a, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x43, 0x0a, 0x0f, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x22, 0xfc, 0x08, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x35, 0x0a, 0x17, 0x69, 0x73, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x6c, 0x6f, + 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x14, 0x69, 0x73, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x19, 0x69, 0x73, 0x5f, 0x66, 0x61, + 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x46, 0x61, + 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x69, 0x73, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, + 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x73, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x19, 0x69, 0x73, 0x5f, + 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x69, 0x6e, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, + 0x4c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x69, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x65, + 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x74, 0x77, 0x69, 0x74, 0x74, 0x65, 0x72, + 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x54, 0x77, 0x69, 0x74, 0x74, 0x65, 0x72, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x69, + 0x73, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x69, + 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x17, 0x69, 0x73, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x69, 0x73, 0x5f, 0x74, + 0x77, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x73, 0x54, 0x77, 0x69, + 0x74, 0x63, 0x68, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, + 0x35, 0x0a, 0x17, 0x69, 0x73, 0x5f, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x5f, 0x6c, 0x6f, 0x67, + 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x14, 0x69, 0x73, 0x52, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x73, 0x5f, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, + 0x73, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x69, 0x73, 0x5f, + 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1c, 0x69, 0x73, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x12, 0x3c, 0x0a, 0x1b, 0x69, 0x73, 0x5f, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6e, + 0x6b, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x69, 0x73, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, + 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2b, + 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x75, 0x70, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x53, 0x69, + 0x67, 0x6e, 0x55, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x69, + 0x73, 0x5f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x17, 0x69, 0x73, 0x53, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x1c, 0x69, 0x73, 0x5f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, + 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x75, 0x74, + 0x68, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x52, 0x0a, 0x26, 0x69, 0x73, 0x5f, 0x6d, + 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x61, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x69, 0x73, 0x4d, 0x6f, 0x62, 0x69, + 0x6c, 0x65, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x41, 0x0a, 0x1d, + 0x69, 0x73, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x73, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, + 0xbb, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, + 0xaa, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x19, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_authorizer_v1_types_proto_rawDescOnce sync.Once + file_authorizer_v1_types_proto_rawDescData = file_authorizer_v1_types_proto_rawDesc +) + +func file_authorizer_v1_types_proto_rawDescGZIP() []byte { + file_authorizer_v1_types_proto_rawDescOnce.Do(func() { + file_authorizer_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_v1_types_proto_rawDescData) + }) + return file_authorizer_v1_types_proto_rawDescData +} + +var file_authorizer_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_authorizer_v1_types_proto_goTypes = []any{ + (*User)(nil), // 0: authorizer.v1.User + (*AuthResponse)(nil), // 1: authorizer.v1.AuthResponse + (*Permission)(nil), // 2: authorizer.v1.Permission + (*PermissionInput)(nil), // 3: authorizer.v1.PermissionInput + (*Meta)(nil), // 4: authorizer.v1.Meta + (*v1.AppData)(nil), // 5: authorizer.common.v1.AppData +} +var file_authorizer_v1_types_proto_depIdxs = []int32{ + 5, // 0: authorizer.v1.User.app_data:type_name -> authorizer.common.v1.AppData + 0, // 1: authorizer.v1.AuthResponse.user:type_name -> authorizer.v1.User + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_authorizer_v1_types_proto_init() } +func file_authorizer_v1_types_proto_init() { + if File_authorizer_v1_types_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_authorizer_v1_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_authorizer_v1_types_proto_goTypes, + DependencyIndexes: file_authorizer_v1_types_proto_depIdxs, + MessageInfos: file_authorizer_v1_types_proto_msgTypes, + }.Build() + File_authorizer_v1_types_proto = out.File + file_authorizer_v1_types_proto_rawDesc = nil + file_authorizer_v1_types_proto_goTypes = nil + file_authorizer_v1_types_proto_depIdxs = nil +} diff --git a/gen/go/authorizer/verification/v1/email_verification_service.pb.go b/gen/go/authorizer/verification/v1/email_verification_service.pb.go deleted file mode 100644 index cd1f30ab..00000000 --- a/gen/go/authorizer/verification/v1/email_verification_service.pb.go +++ /dev/null @@ -1,376 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/verification/v1/email_verification_service.proto - -package verificationv1 - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - _ "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - v1 "github.com/authorizerdev/authorizer/gen/go/authorizer/session/v1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateEmailVerificationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - // Verification identifier (typeof verification, e.g. basic-auth-signup). - Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"` - State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *CreateEmailVerificationRequest) Reset() { - *x = CreateEmailVerificationRequest{} - mi := &file_authorizer_verification_v1_email_verification_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateEmailVerificationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEmailVerificationRequest) ProtoMessage() {} - -func (x *CreateEmailVerificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_email_verification_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateEmailVerificationRequest.ProtoReflect.Descriptor instead. -func (*CreateEmailVerificationRequest) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_email_verification_service_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateEmailVerificationRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *CreateEmailVerificationRequest) GetIdentifier() string { - if x != nil { - return x.Identifier - } - return "" -} - -func (x *CreateEmailVerificationRequest) GetState() string { - if x != nil { - return x.State - } - return "" -} - -type CreateEmailVerificationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *CreateEmailVerificationResponse) Reset() { - *x = CreateEmailVerificationResponse{} - mi := &file_authorizer_verification_v1_email_verification_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateEmailVerificationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEmailVerificationResponse) ProtoMessage() {} - -func (x *CreateEmailVerificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_email_verification_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateEmailVerificationResponse.ProtoReflect.Descriptor instead. -func (*CreateEmailVerificationResponse) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_email_verification_service_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateEmailVerificationResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type ConfirmEmailVerificationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *ConfirmEmailVerificationRequest) Reset() { - *x = ConfirmEmailVerificationRequest{} - mi := &file_authorizer_verification_v1_email_verification_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmEmailVerificationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmEmailVerificationRequest) ProtoMessage() {} - -func (x *ConfirmEmailVerificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_email_verification_service_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmEmailVerificationRequest.ProtoReflect.Descriptor instead. -func (*ConfirmEmailVerificationRequest) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_email_verification_service_proto_rawDescGZIP(), []int{2} -} - -func (x *ConfirmEmailVerificationRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *ConfirmEmailVerificationRequest) GetState() string { - if x != nil { - return x.State - } - return "" -} - -type ConfirmEmailVerificationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Session *v1.Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` -} - -func (x *ConfirmEmailVerificationResponse) Reset() { - *x = ConfirmEmailVerificationResponse{} - mi := &file_authorizer_verification_v1_email_verification_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmEmailVerificationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmEmailVerificationResponse) ProtoMessage() {} - -func (x *ConfirmEmailVerificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_email_verification_service_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmEmailVerificationResponse.ProtoReflect.Descriptor instead. -func (*ConfirmEmailVerificationResponse) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_email_verification_service_proto_rawDescGZIP(), []int{3} -} - -func (x *ConfirmEmailVerificationResponse) GetSession() *v1.Session { - if x != nil { - return x.Session - } - return nil -} - -var File_authorizer_verification_v1_email_verification_service_proto protoreflect.FileDescriptor - -var file_authorizer_verification_v1_email_verification_service_proto_rawDesc = []byte{ - 0x0a, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x81, 0x01, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, - 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x18, 0xc0, 0x02, 0x60, 0x01, 0x52, - 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x27, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, - 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0x56, 0x0a, 0x1f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x5c, 0x0a, 0x20, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, - 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xa3, 0x03, 0x0a, 0x18, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xba, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x3a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xa0, 0xb5, 0x18, 0x01, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x2d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0xc9, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x3b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x98, 0xb5, 0x18, 0x01, - 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x1a, 0x1f, 0x2f, - 0x76, 0x31, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x7d, 0x42, 0x9f, - 0x02, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x42, 0x1d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x56, 0x58, 0xaa, 0x02, - 0x1a, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x26, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x1c, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_verification_v1_email_verification_service_proto_rawDescOnce sync.Once - file_authorizer_verification_v1_email_verification_service_proto_rawDescData = file_authorizer_verification_v1_email_verification_service_proto_rawDesc -) - -func file_authorizer_verification_v1_email_verification_service_proto_rawDescGZIP() []byte { - file_authorizer_verification_v1_email_verification_service_proto_rawDescOnce.Do(func() { - file_authorizer_verification_v1_email_verification_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_verification_v1_email_verification_service_proto_rawDescData) - }) - return file_authorizer_verification_v1_email_verification_service_proto_rawDescData -} - -var file_authorizer_verification_v1_email_verification_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_authorizer_verification_v1_email_verification_service_proto_goTypes = []any{ - (*CreateEmailVerificationRequest)(nil), // 0: authorizer.verification.v1.CreateEmailVerificationRequest - (*CreateEmailVerificationResponse)(nil), // 1: authorizer.verification.v1.CreateEmailVerificationResponse - (*ConfirmEmailVerificationRequest)(nil), // 2: authorizer.verification.v1.ConfirmEmailVerificationRequest - (*ConfirmEmailVerificationResponse)(nil), // 3: authorizer.verification.v1.ConfirmEmailVerificationResponse - (*v1.Session)(nil), // 4: authorizer.session.v1.Session -} -var file_authorizer_verification_v1_email_verification_service_proto_depIdxs = []int32{ - 4, // 0: authorizer.verification.v1.ConfirmEmailVerificationResponse.session:type_name -> authorizer.session.v1.Session - 0, // 1: authorizer.verification.v1.EmailVerificationService.CreateEmailVerification:input_type -> authorizer.verification.v1.CreateEmailVerificationRequest - 2, // 2: authorizer.verification.v1.EmailVerificationService.ConfirmEmailVerification:input_type -> authorizer.verification.v1.ConfirmEmailVerificationRequest - 1, // 3: authorizer.verification.v1.EmailVerificationService.CreateEmailVerification:output_type -> authorizer.verification.v1.CreateEmailVerificationResponse - 3, // 4: authorizer.verification.v1.EmailVerificationService.ConfirmEmailVerification:output_type -> authorizer.verification.v1.ConfirmEmailVerificationResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_authorizer_verification_v1_email_verification_service_proto_init() } -func file_authorizer_verification_v1_email_verification_service_proto_init() { - if File_authorizer_verification_v1_email_verification_service_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_verification_v1_email_verification_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_authorizer_verification_v1_email_verification_service_proto_goTypes, - DependencyIndexes: file_authorizer_verification_v1_email_verification_service_proto_depIdxs, - MessageInfos: file_authorizer_verification_v1_email_verification_service_proto_msgTypes, - }.Build() - File_authorizer_verification_v1_email_verification_service_proto = out.File - file_authorizer_verification_v1_email_verification_service_proto_rawDesc = nil - file_authorizer_verification_v1_email_verification_service_proto_goTypes = nil - file_authorizer_verification_v1_email_verification_service_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/verification/v1/email_verification_service.pb.gw.go b/gen/go/authorizer/verification/v1/email_verification_service.pb.gw.go deleted file mode 100644 index bfe8176b..00000000 --- a/gen/go/authorizer/verification/v1/email_verification_service.pb.gw.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: authorizer/verification/v1/email_verification_service.proto - -/* -Package verificationv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package verificationv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_EmailVerificationService_CreateEmailVerification_0(ctx context.Context, marshaler runtime.Marshaler, client EmailVerificationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateEmailVerificationRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateEmailVerification(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EmailVerificationService_CreateEmailVerification_0(ctx context.Context, marshaler runtime.Marshaler, server EmailVerificationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateEmailVerificationRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateEmailVerification(ctx, &protoReq) - return msg, metadata, err - -} - -func request_EmailVerificationService_ConfirmEmailVerification_0(ctx context.Context, marshaler runtime.Marshaler, client EmailVerificationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ConfirmEmailVerificationRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["token"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "token") - } - - protoReq.Token, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "token", err) - } - - msg, err := client.ConfirmEmailVerification(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EmailVerificationService_ConfirmEmailVerification_0(ctx context.Context, marshaler runtime.Marshaler, server EmailVerificationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ConfirmEmailVerificationRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["token"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "token") - } - - protoReq.Token, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "token", err) - } - - msg, err := server.ConfirmEmailVerification(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterEmailVerificationServiceHandlerServer registers the http handlers for service EmailVerificationService to "mux". -// UnaryRPC :call EmailVerificationServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEmailVerificationServiceHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterEmailVerificationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EmailVerificationServiceServer) error { - - mux.Handle("POST", pattern_EmailVerificationService_CreateEmailVerification_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.verification.v1.EmailVerificationService/CreateEmailVerification", runtime.WithHTTPPathPattern("/v1/email-verifications")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EmailVerificationService_CreateEmailVerification_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EmailVerificationService_CreateEmailVerification_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_EmailVerificationService_ConfirmEmailVerification_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.verification.v1.EmailVerificationService/ConfirmEmailVerification", runtime.WithHTTPPathPattern("/v1/email-verifications/{token}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EmailVerificationService_ConfirmEmailVerification_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EmailVerificationService_ConfirmEmailVerification_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterEmailVerificationServiceHandlerFromEndpoint is same as RegisterEmailVerificationServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterEmailVerificationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterEmailVerificationServiceHandler(ctx, mux, conn) -} - -// RegisterEmailVerificationServiceHandler registers the http handlers for service EmailVerificationService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterEmailVerificationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterEmailVerificationServiceHandlerClient(ctx, mux, NewEmailVerificationServiceClient(conn)) -} - -// RegisterEmailVerificationServiceHandlerClient registers the http handlers for service EmailVerificationService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EmailVerificationServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EmailVerificationServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "EmailVerificationServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterEmailVerificationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EmailVerificationServiceClient) error { - - mux.Handle("POST", pattern_EmailVerificationService_CreateEmailVerification_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.verification.v1.EmailVerificationService/CreateEmailVerification", runtime.WithHTTPPathPattern("/v1/email-verifications")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EmailVerificationService_CreateEmailVerification_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EmailVerificationService_CreateEmailVerification_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_EmailVerificationService_ConfirmEmailVerification_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.verification.v1.EmailVerificationService/ConfirmEmailVerification", runtime.WithHTTPPathPattern("/v1/email-verifications/{token}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EmailVerificationService_ConfirmEmailVerification_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EmailVerificationService_ConfirmEmailVerification_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_EmailVerificationService_CreateEmailVerification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "email-verifications"}, "")) - - pattern_EmailVerificationService_ConfirmEmailVerification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "email-verifications", "token"}, "")) -) - -var ( - forward_EmailVerificationService_CreateEmailVerification_0 = runtime.ForwardResponseMessage - - forward_EmailVerificationService_ConfirmEmailVerification_0 = runtime.ForwardResponseMessage -) diff --git a/gen/go/authorizer/verification/v1/email_verification_service_grpc.pb.go b/gen/go/authorizer/verification/v1/email_verification_service_grpc.pb.go deleted file mode 100644 index 1f190314..00000000 --- a/gen/go/authorizer/verification/v1/email_verification_service_grpc.pb.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: authorizer/verification/v1/email_verification_service.proto - -package verificationv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - EmailVerificationService_CreateEmailVerification_FullMethodName = "/authorizer.verification.v1.EmailVerificationService/CreateEmailVerification" - EmailVerificationService_ConfirmEmailVerification_FullMethodName = "/authorizer.verification.v1.EmailVerificationService/ConfirmEmailVerification" -) - -// EmailVerificationServiceClient is the client API for EmailVerificationService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// EmailVerificationService models the email-verification challenge as a -// resource. Create dispatches (or re-dispatches) a verification email; -// Confirm completes the verification with the token from the email link. -type EmailVerificationServiceClient interface { - // CreateEmailVerification (re)sends the verification email for an - // unverified address. Returns 201; idempotent within a short window. - CreateEmailVerification(ctx context.Context, in *CreateEmailVerificationRequest, opts ...grpc.CallOption) (*CreateEmailVerificationResponse, error) - // ConfirmEmailVerification marks the verification complete. Returns a - // Session when the original signup was a self-sign-up flow (so the user - // is logged in immediately); otherwise returns the empty Session. - ConfirmEmailVerification(ctx context.Context, in *ConfirmEmailVerificationRequest, opts ...grpc.CallOption) (*ConfirmEmailVerificationResponse, error) -} - -type emailVerificationServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewEmailVerificationServiceClient(cc grpc.ClientConnInterface) EmailVerificationServiceClient { - return &emailVerificationServiceClient{cc} -} - -func (c *emailVerificationServiceClient) CreateEmailVerification(ctx context.Context, in *CreateEmailVerificationRequest, opts ...grpc.CallOption) (*CreateEmailVerificationResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateEmailVerificationResponse) - err := c.cc.Invoke(ctx, EmailVerificationService_CreateEmailVerification_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *emailVerificationServiceClient) ConfirmEmailVerification(ctx context.Context, in *ConfirmEmailVerificationRequest, opts ...grpc.CallOption) (*ConfirmEmailVerificationResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ConfirmEmailVerificationResponse) - err := c.cc.Invoke(ctx, EmailVerificationService_ConfirmEmailVerification_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// EmailVerificationServiceServer is the server API for EmailVerificationService service. -// All implementations should embed UnimplementedEmailVerificationServiceServer -// for forward compatibility. -// -// EmailVerificationService models the email-verification challenge as a -// resource. Create dispatches (or re-dispatches) a verification email; -// Confirm completes the verification with the token from the email link. -type EmailVerificationServiceServer interface { - // CreateEmailVerification (re)sends the verification email for an - // unverified address. Returns 201; idempotent within a short window. - CreateEmailVerification(context.Context, *CreateEmailVerificationRequest) (*CreateEmailVerificationResponse, error) - // ConfirmEmailVerification marks the verification complete. Returns a - // Session when the original signup was a self-sign-up flow (so the user - // is logged in immediately); otherwise returns the empty Session. - ConfirmEmailVerification(context.Context, *ConfirmEmailVerificationRequest) (*ConfirmEmailVerificationResponse, error) -} - -// UnimplementedEmailVerificationServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedEmailVerificationServiceServer struct{} - -func (UnimplementedEmailVerificationServiceServer) CreateEmailVerification(context.Context, *CreateEmailVerificationRequest) (*CreateEmailVerificationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateEmailVerification not implemented") -} -func (UnimplementedEmailVerificationServiceServer) ConfirmEmailVerification(context.Context, *ConfirmEmailVerificationRequest) (*ConfirmEmailVerificationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ConfirmEmailVerification not implemented") -} -func (UnimplementedEmailVerificationServiceServer) testEmbeddedByValue() {} - -// UnsafeEmailVerificationServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to EmailVerificationServiceServer will -// result in compilation errors. -type UnsafeEmailVerificationServiceServer interface { - mustEmbedUnimplementedEmailVerificationServiceServer() -} - -func RegisterEmailVerificationServiceServer(s grpc.ServiceRegistrar, srv EmailVerificationServiceServer) { - // If the following call pancis, it indicates UnimplementedEmailVerificationServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&EmailVerificationService_ServiceDesc, srv) -} - -func _EmailVerificationService_CreateEmailVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateEmailVerificationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EmailVerificationServiceServer).CreateEmailVerification(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: EmailVerificationService_CreateEmailVerification_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EmailVerificationServiceServer).CreateEmailVerification(ctx, req.(*CreateEmailVerificationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EmailVerificationService_ConfirmEmailVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmEmailVerificationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EmailVerificationServiceServer).ConfirmEmailVerification(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: EmailVerificationService_ConfirmEmailVerification_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EmailVerificationServiceServer).ConfirmEmailVerification(ctx, req.(*ConfirmEmailVerificationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// EmailVerificationService_ServiceDesc is the grpc.ServiceDesc for EmailVerificationService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var EmailVerificationService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.verification.v1.EmailVerificationService", - HandlerType: (*EmailVerificationServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateEmailVerification", - Handler: _EmailVerificationService_CreateEmailVerification_Handler, - }, - { - MethodName: "ConfirmEmailVerification", - Handler: _EmailVerificationService_ConfirmEmailVerification_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authorizer/verification/v1/email_verification_service.proto", -} diff --git a/gen/go/authorizer/verification/v1/otp_challenge_service.pb.go b/gen/go/authorizer/verification/v1/otp_challenge_service.pb.go deleted file mode 100644 index a2ea35f5..00000000 --- a/gen/go/authorizer/verification/v1/otp_challenge_service.pb.go +++ /dev/null @@ -1,417 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/verification/v1/otp_challenge_service.proto - -package verificationv1 - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - _ "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - v1 "github.com/authorizerdev/authorizer/gen/go/authorizer/session/v1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateOtpChallengeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Exactly one of email / phone_number is required. - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *CreateOtpChallengeRequest) Reset() { - *x = CreateOtpChallengeRequest{} - mi := &file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateOtpChallengeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateOtpChallengeRequest) ProtoMessage() {} - -func (x *CreateOtpChallengeRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateOtpChallengeRequest.ProtoReflect.Descriptor instead. -func (*CreateOtpChallengeRequest) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_otp_challenge_service_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateOtpChallengeRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *CreateOtpChallengeRequest) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *CreateOtpChallengeRequest) GetState() string { - if x != nil { - return x.State - } - return "" -} - -type CreateOtpChallengeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *CreateOtpChallengeResponse) Reset() { - *x = CreateOtpChallengeResponse{} - mi := &file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateOtpChallengeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateOtpChallengeResponse) ProtoMessage() {} - -func (x *CreateOtpChallengeResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateOtpChallengeResponse.ProtoReflect.Descriptor instead. -func (*CreateOtpChallengeResponse) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_otp_challenge_service_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateOtpChallengeResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type ConfirmOtpChallengeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Opaque challenge id (today: the email / phone the OTP was sent to). - ChallengeId string `protobuf:"bytes,1,opt,name=challenge_id,json=challengeId,proto3" json:"challenge_id,omitempty"` - // The OTP value the user entered. - Otp string `protobuf:"bytes,2,opt,name=otp,proto3" json:"otp,omitempty"` - // Either email or phone_number identifies the user (mirrors challenge_id - // for now; reserved for a future opaque challenge-id design). - Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` - PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - IsTotp bool `protobuf:"varint,5,opt,name=is_totp,json=isTotp,proto3" json:"is_totp,omitempty"` - State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *ConfirmOtpChallengeRequest) Reset() { - *x = ConfirmOtpChallengeRequest{} - mi := &file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmOtpChallengeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmOtpChallengeRequest) ProtoMessage() {} - -func (x *ConfirmOtpChallengeRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmOtpChallengeRequest.ProtoReflect.Descriptor instead. -func (*ConfirmOtpChallengeRequest) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_otp_challenge_service_proto_rawDescGZIP(), []int{2} -} - -func (x *ConfirmOtpChallengeRequest) GetChallengeId() string { - if x != nil { - return x.ChallengeId - } - return "" -} - -func (x *ConfirmOtpChallengeRequest) GetOtp() string { - if x != nil { - return x.Otp - } - return "" -} - -func (x *ConfirmOtpChallengeRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *ConfirmOtpChallengeRequest) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *ConfirmOtpChallengeRequest) GetIsTotp() bool { - if x != nil { - return x.IsTotp - } - return false -} - -func (x *ConfirmOtpChallengeRequest) GetState() string { - if x != nil { - return x.State - } - return "" -} - -type ConfirmOtpChallengeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Session *v1.Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` -} - -func (x *ConfirmOtpChallengeResponse) Reset() { - *x = ConfirmOtpChallengeResponse{} - mi := &file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmOtpChallengeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmOtpChallengeResponse) ProtoMessage() {} - -func (x *ConfirmOtpChallengeResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmOtpChallengeResponse.ProtoReflect.Descriptor instead. -func (*ConfirmOtpChallengeResponse) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_otp_challenge_service_proto_rawDescGZIP(), []int{3} -} - -func (x *ConfirmOtpChallengeResponse) GetSession() *v1.Session { - if x != nil { - return x.Session - } - return nil -} - -var File_authorizer_verification_v1_otp_challenge_service_proto protoreflect.FileDescriptor - -var file_authorizer_verification_v1_otp_challenge_service_proto_rawDesc = []byte{ - 0x0a, 0x36, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x74, 0x70, - 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x26, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x19, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, - 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x36, 0x0a, 0x1a, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4f, - 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1b, - 0x0a, 0x03, 0x6f, 0x74, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xba, 0x48, 0x06, - 0x72, 0x04, 0x10, 0x01, 0x18, 0x10, 0x52, 0x03, 0x6f, 0x74, 0x70, 0x12, 0x1e, 0x0a, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, - 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x0c, 0x70, - 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x74, 0x6f, - 0x74, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x54, 0x6f, 0x74, 0x70, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x57, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x4f, 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, - 0xfd, 0x02, 0x0a, 0x13, 0x4f, 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4f, 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x35, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4f, 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, - 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0xa0, - 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, - 0x31, 0x2f, 0x6f, 0x74, 0x70, 0x2d, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x73, - 0x12, 0xbc, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4f, 0x74, 0x70, 0x43, - 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x36, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4f, 0x74, 0x70, - 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x37, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4f, 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x98, 0xb5, 0x18, 0x01, 0xa0, - 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x1a, 0x21, 0x2f, 0x76, - 0x31, 0x2f, 0x6f, 0x74, 0x70, 0x2d, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x73, - 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x42, - 0x9a, 0x02, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x42, 0x18, 0x4f, 0x74, 0x70, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x56, 0x58, 0xaa, 0x02, 0x1a, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x26, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x72, 0x5c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_verification_v1_otp_challenge_service_proto_rawDescOnce sync.Once - file_authorizer_verification_v1_otp_challenge_service_proto_rawDescData = file_authorizer_verification_v1_otp_challenge_service_proto_rawDesc -) - -func file_authorizer_verification_v1_otp_challenge_service_proto_rawDescGZIP() []byte { - file_authorizer_verification_v1_otp_challenge_service_proto_rawDescOnce.Do(func() { - file_authorizer_verification_v1_otp_challenge_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_verification_v1_otp_challenge_service_proto_rawDescData) - }) - return file_authorizer_verification_v1_otp_challenge_service_proto_rawDescData -} - -var file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_authorizer_verification_v1_otp_challenge_service_proto_goTypes = []any{ - (*CreateOtpChallengeRequest)(nil), // 0: authorizer.verification.v1.CreateOtpChallengeRequest - (*CreateOtpChallengeResponse)(nil), // 1: authorizer.verification.v1.CreateOtpChallengeResponse - (*ConfirmOtpChallengeRequest)(nil), // 2: authorizer.verification.v1.ConfirmOtpChallengeRequest - (*ConfirmOtpChallengeResponse)(nil), // 3: authorizer.verification.v1.ConfirmOtpChallengeResponse - (*v1.Session)(nil), // 4: authorizer.session.v1.Session -} -var file_authorizer_verification_v1_otp_challenge_service_proto_depIdxs = []int32{ - 4, // 0: authorizer.verification.v1.ConfirmOtpChallengeResponse.session:type_name -> authorizer.session.v1.Session - 0, // 1: authorizer.verification.v1.OtpChallengeService.CreateOtpChallenge:input_type -> authorizer.verification.v1.CreateOtpChallengeRequest - 2, // 2: authorizer.verification.v1.OtpChallengeService.ConfirmOtpChallenge:input_type -> authorizer.verification.v1.ConfirmOtpChallengeRequest - 1, // 3: authorizer.verification.v1.OtpChallengeService.CreateOtpChallenge:output_type -> authorizer.verification.v1.CreateOtpChallengeResponse - 3, // 4: authorizer.verification.v1.OtpChallengeService.ConfirmOtpChallenge:output_type -> authorizer.verification.v1.ConfirmOtpChallengeResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_authorizer_verification_v1_otp_challenge_service_proto_init() } -func file_authorizer_verification_v1_otp_challenge_service_proto_init() { - if File_authorizer_verification_v1_otp_challenge_service_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_verification_v1_otp_challenge_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_authorizer_verification_v1_otp_challenge_service_proto_goTypes, - DependencyIndexes: file_authorizer_verification_v1_otp_challenge_service_proto_depIdxs, - MessageInfos: file_authorizer_verification_v1_otp_challenge_service_proto_msgTypes, - }.Build() - File_authorizer_verification_v1_otp_challenge_service_proto = out.File - file_authorizer_verification_v1_otp_challenge_service_proto_rawDesc = nil - file_authorizer_verification_v1_otp_challenge_service_proto_goTypes = nil - file_authorizer_verification_v1_otp_challenge_service_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/verification/v1/otp_challenge_service.pb.gw.go b/gen/go/authorizer/verification/v1/otp_challenge_service.pb.gw.go deleted file mode 100644 index 0955a2c7..00000000 --- a/gen/go/authorizer/verification/v1/otp_challenge_service.pb.gw.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: authorizer/verification/v1/otp_challenge_service.proto - -/* -Package verificationv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package verificationv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_OtpChallengeService_CreateOtpChallenge_0(ctx context.Context, marshaler runtime.Marshaler, client OtpChallengeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateOtpChallengeRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateOtpChallenge(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_OtpChallengeService_CreateOtpChallenge_0(ctx context.Context, marshaler runtime.Marshaler, server OtpChallengeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateOtpChallengeRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateOtpChallenge(ctx, &protoReq) - return msg, metadata, err - -} - -func request_OtpChallengeService_ConfirmOtpChallenge_0(ctx context.Context, marshaler runtime.Marshaler, client OtpChallengeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ConfirmOtpChallengeRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["challenge_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "challenge_id") - } - - protoReq.ChallengeId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "challenge_id", err) - } - - msg, err := client.ConfirmOtpChallenge(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_OtpChallengeService_ConfirmOtpChallenge_0(ctx context.Context, marshaler runtime.Marshaler, server OtpChallengeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ConfirmOtpChallengeRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["challenge_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "challenge_id") - } - - protoReq.ChallengeId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "challenge_id", err) - } - - msg, err := server.ConfirmOtpChallenge(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterOtpChallengeServiceHandlerServer registers the http handlers for service OtpChallengeService to "mux". -// UnaryRPC :call OtpChallengeServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterOtpChallengeServiceHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterOtpChallengeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OtpChallengeServiceServer) error { - - mux.Handle("POST", pattern_OtpChallengeService_CreateOtpChallenge_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.verification.v1.OtpChallengeService/CreateOtpChallenge", runtime.WithHTTPPathPattern("/v1/otp-challenges")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_OtpChallengeService_CreateOtpChallenge_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_OtpChallengeService_CreateOtpChallenge_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_OtpChallengeService_ConfirmOtpChallenge_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.verification.v1.OtpChallengeService/ConfirmOtpChallenge", runtime.WithHTTPPathPattern("/v1/otp-challenges/{challenge_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_OtpChallengeService_ConfirmOtpChallenge_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_OtpChallengeService_ConfirmOtpChallenge_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterOtpChallengeServiceHandlerFromEndpoint is same as RegisterOtpChallengeServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterOtpChallengeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterOtpChallengeServiceHandler(ctx, mux, conn) -} - -// RegisterOtpChallengeServiceHandler registers the http handlers for service OtpChallengeService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterOtpChallengeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterOtpChallengeServiceHandlerClient(ctx, mux, NewOtpChallengeServiceClient(conn)) -} - -// RegisterOtpChallengeServiceHandlerClient registers the http handlers for service OtpChallengeService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OtpChallengeServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OtpChallengeServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "OtpChallengeServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterOtpChallengeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OtpChallengeServiceClient) error { - - mux.Handle("POST", pattern_OtpChallengeService_CreateOtpChallenge_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.verification.v1.OtpChallengeService/CreateOtpChallenge", runtime.WithHTTPPathPattern("/v1/otp-challenges")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_OtpChallengeService_CreateOtpChallenge_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_OtpChallengeService_CreateOtpChallenge_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_OtpChallengeService_ConfirmOtpChallenge_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.verification.v1.OtpChallengeService/ConfirmOtpChallenge", runtime.WithHTTPPathPattern("/v1/otp-challenges/{challenge_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_OtpChallengeService_ConfirmOtpChallenge_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_OtpChallengeService_ConfirmOtpChallenge_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_OtpChallengeService_CreateOtpChallenge_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "otp-challenges"}, "")) - - pattern_OtpChallengeService_ConfirmOtpChallenge_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "otp-challenges", "challenge_id"}, "")) -) - -var ( - forward_OtpChallengeService_CreateOtpChallenge_0 = runtime.ForwardResponseMessage - - forward_OtpChallengeService_ConfirmOtpChallenge_0 = runtime.ForwardResponseMessage -) diff --git a/gen/go/authorizer/verification/v1/otp_challenge_service_grpc.pb.go b/gen/go/authorizer/verification/v1/otp_challenge_service_grpc.pb.go deleted file mode 100644 index 9625e103..00000000 --- a/gen/go/authorizer/verification/v1/otp_challenge_service_grpc.pb.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: authorizer/verification/v1/otp_challenge_service.proto - -package verificationv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - OtpChallengeService_CreateOtpChallenge_FullMethodName = "/authorizer.verification.v1.OtpChallengeService/CreateOtpChallenge" - OtpChallengeService_ConfirmOtpChallenge_FullMethodName = "/authorizer.verification.v1.OtpChallengeService/ConfirmOtpChallenge" -) - -// OtpChallengeServiceClient is the client API for OtpChallengeService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// OtpChallengeService models the OTP step (email or SMS or TOTP) as a -// challenge resource. Create requests a fresh OTP; Confirm verifies it and -// — if successful — issues a Session (since OTP is the second factor of an -// in-progress login). -type OtpChallengeServiceClient interface { - // CreateOtpChallenge (re)sends an OTP to the address tied to an - // in-progress login. Returns 201. - CreateOtpChallenge(ctx context.Context, in *CreateOtpChallengeRequest, opts ...grpc.CallOption) (*CreateOtpChallengeResponse, error) - // ConfirmOtpChallenge verifies the supplied OTP and, on success, returns - // a Session for the user. Browser callers also receive Set-Cookie. - ConfirmOtpChallenge(ctx context.Context, in *ConfirmOtpChallengeRequest, opts ...grpc.CallOption) (*ConfirmOtpChallengeResponse, error) -} - -type otpChallengeServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewOtpChallengeServiceClient(cc grpc.ClientConnInterface) OtpChallengeServiceClient { - return &otpChallengeServiceClient{cc} -} - -func (c *otpChallengeServiceClient) CreateOtpChallenge(ctx context.Context, in *CreateOtpChallengeRequest, opts ...grpc.CallOption) (*CreateOtpChallengeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateOtpChallengeResponse) - err := c.cc.Invoke(ctx, OtpChallengeService_CreateOtpChallenge_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *otpChallengeServiceClient) ConfirmOtpChallenge(ctx context.Context, in *ConfirmOtpChallengeRequest, opts ...grpc.CallOption) (*ConfirmOtpChallengeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ConfirmOtpChallengeResponse) - err := c.cc.Invoke(ctx, OtpChallengeService_ConfirmOtpChallenge_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// OtpChallengeServiceServer is the server API for OtpChallengeService service. -// All implementations should embed UnimplementedOtpChallengeServiceServer -// for forward compatibility. -// -// OtpChallengeService models the OTP step (email or SMS or TOTP) as a -// challenge resource. Create requests a fresh OTP; Confirm verifies it and -// — if successful — issues a Session (since OTP is the second factor of an -// in-progress login). -type OtpChallengeServiceServer interface { - // CreateOtpChallenge (re)sends an OTP to the address tied to an - // in-progress login. Returns 201. - CreateOtpChallenge(context.Context, *CreateOtpChallengeRequest) (*CreateOtpChallengeResponse, error) - // ConfirmOtpChallenge verifies the supplied OTP and, on success, returns - // a Session for the user. Browser callers also receive Set-Cookie. - ConfirmOtpChallenge(context.Context, *ConfirmOtpChallengeRequest) (*ConfirmOtpChallengeResponse, error) -} - -// UnimplementedOtpChallengeServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedOtpChallengeServiceServer struct{} - -func (UnimplementedOtpChallengeServiceServer) CreateOtpChallenge(context.Context, *CreateOtpChallengeRequest) (*CreateOtpChallengeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateOtpChallenge not implemented") -} -func (UnimplementedOtpChallengeServiceServer) ConfirmOtpChallenge(context.Context, *ConfirmOtpChallengeRequest) (*ConfirmOtpChallengeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ConfirmOtpChallenge not implemented") -} -func (UnimplementedOtpChallengeServiceServer) testEmbeddedByValue() {} - -// UnsafeOtpChallengeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to OtpChallengeServiceServer will -// result in compilation errors. -type UnsafeOtpChallengeServiceServer interface { - mustEmbedUnimplementedOtpChallengeServiceServer() -} - -func RegisterOtpChallengeServiceServer(s grpc.ServiceRegistrar, srv OtpChallengeServiceServer) { - // If the following call pancis, it indicates UnimplementedOtpChallengeServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&OtpChallengeService_ServiceDesc, srv) -} - -func _OtpChallengeService_CreateOtpChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateOtpChallengeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OtpChallengeServiceServer).CreateOtpChallenge(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: OtpChallengeService_CreateOtpChallenge_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OtpChallengeServiceServer).CreateOtpChallenge(ctx, req.(*CreateOtpChallengeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _OtpChallengeService_ConfirmOtpChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmOtpChallengeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OtpChallengeServiceServer).ConfirmOtpChallenge(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: OtpChallengeService_ConfirmOtpChallenge_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OtpChallengeServiceServer).ConfirmOtpChallenge(ctx, req.(*ConfirmOtpChallengeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// OtpChallengeService_ServiceDesc is the grpc.ServiceDesc for OtpChallengeService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var OtpChallengeService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.verification.v1.OtpChallengeService", - HandlerType: (*OtpChallengeServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateOtpChallenge", - Handler: _OtpChallengeService_CreateOtpChallenge_Handler, - }, - { - MethodName: "ConfirmOtpChallenge", - Handler: _OtpChallengeService_ConfirmOtpChallenge_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authorizer/verification/v1/otp_challenge_service.proto", -} diff --git a/gen/go/authorizer/verification/v1/password_reset_service.pb.go b/gen/go/authorizer/verification/v1/password_reset_service.pb.go deleted file mode 100644 index d6380214..00000000 --- a/gen/go/authorizer/verification/v1/password_reset_service.pb.go +++ /dev/null @@ -1,415 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc (unknown) -// source: authorizer/verification/v1/password_reset_service.proto - -package verificationv1 - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - _ "github.com/authorizerdev/authorizer/gen/go/authorizer/common/v1" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreatePasswordResetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Exactly one of email / phone_number is required. - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` - RedirectUri string `protobuf:"bytes,4,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` -} - -func (x *CreatePasswordResetRequest) Reset() { - *x = CreatePasswordResetRequest{} - mi := &file_authorizer_verification_v1_password_reset_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePasswordResetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePasswordResetRequest) ProtoMessage() {} - -func (x *CreatePasswordResetRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_password_reset_service_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePasswordResetRequest.ProtoReflect.Descriptor instead. -func (*CreatePasswordResetRequest) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_password_reset_service_proto_rawDescGZIP(), []int{0} -} - -func (x *CreatePasswordResetRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *CreatePasswordResetRequest) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *CreatePasswordResetRequest) GetState() string { - if x != nil { - return x.State - } - return "" -} - -func (x *CreatePasswordResetRequest) GetRedirectUri() string { - if x != nil { - return x.RedirectUri - } - return "" -} - -type CreatePasswordResetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - // Mobile callers may need to render an OTP entry screen (when reset is - // SMS-driven). Mirrors GraphQL ForgotPasswordResponse. - ShouldShowMobileOtpScreen bool `protobuf:"varint,2,opt,name=should_show_mobile_otp_screen,json=shouldShowMobileOtpScreen,proto3" json:"should_show_mobile_otp_screen,omitempty"` -} - -func (x *CreatePasswordResetResponse) Reset() { - *x = CreatePasswordResetResponse{} - mi := &file_authorizer_verification_v1_password_reset_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePasswordResetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePasswordResetResponse) ProtoMessage() {} - -func (x *CreatePasswordResetResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_password_reset_service_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePasswordResetResponse.ProtoReflect.Descriptor instead. -func (*CreatePasswordResetResponse) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_password_reset_service_proto_rawDescGZIP(), []int{1} -} - -func (x *CreatePasswordResetResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *CreatePasswordResetResponse) GetShouldShowMobileOtpScreen() bool { - if x != nil { - return x.ShouldShowMobileOtpScreen - } - return false -} - -type ConfirmPasswordResetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The token from the reset email/SMS; for SMS flows it's the OTP value. - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - // For SMS flows: the user identifier the OTP was bound to. - PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - ConfirmPassword string `protobuf:"bytes,4,opt,name=confirm_password,json=confirmPassword,proto3" json:"confirm_password,omitempty"` -} - -func (x *ConfirmPasswordResetRequest) Reset() { - *x = ConfirmPasswordResetRequest{} - mi := &file_authorizer_verification_v1_password_reset_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmPasswordResetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmPasswordResetRequest) ProtoMessage() {} - -func (x *ConfirmPasswordResetRequest) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_password_reset_service_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmPasswordResetRequest.ProtoReflect.Descriptor instead. -func (*ConfirmPasswordResetRequest) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_password_reset_service_proto_rawDescGZIP(), []int{2} -} - -func (x *ConfirmPasswordResetRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *ConfirmPasswordResetRequest) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *ConfirmPasswordResetRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *ConfirmPasswordResetRequest) GetConfirmPassword() string { - if x != nil { - return x.ConfirmPassword - } - return "" -} - -type ConfirmPasswordResetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *ConfirmPasswordResetResponse) Reset() { - *x = ConfirmPasswordResetResponse{} - mi := &file_authorizer_verification_v1_password_reset_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmPasswordResetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmPasswordResetResponse) ProtoMessage() {} - -func (x *ConfirmPasswordResetResponse) ProtoReflect() protoreflect.Message { - mi := &file_authorizer_verification_v1_password_reset_service_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmPasswordResetResponse.ProtoReflect.Descriptor instead. -func (*ConfirmPasswordResetResponse) Descriptor() ([]byte, []int) { - return file_authorizer_verification_v1_password_reset_service_proto_rawDescGZIP(), []int{3} -} - -func (x *ConfirmPasswordResetResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_authorizer_verification_v1_password_reset_service_proto protoreflect.FileDescriptor - -var file_authorizer_verification_v1_password_reset_service_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x26, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0xc0, 0x02, - 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, - 0x48, 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, 0x22, 0x79, 0x0a, 0x1b, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x1d, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, - 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x5f, 0x6f, 0x74, 0x70, 0x5f, - 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x68, - 0x6f, 0x75, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x77, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x4f, 0x74, - 0x70, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0xc7, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, - 0x04, 0x72, 0x02, 0x18, 0x20, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x01, - 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x10, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x01, - 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x22, 0x38, 0x0a, 0x1c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xff, 0x02, 0x0a, 0x14, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0xaa, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x36, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xa0, - 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, - 0x31, 0x2f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2d, 0x72, 0x65, 0x73, 0x65, 0x74, - 0x73, 0x12, 0xb9, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x98, - 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, - 0x1a, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2d, 0x72, - 0x65, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x7d, 0x42, 0x9b, 0x02, - 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x42, 0x19, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x56, 0x58, 0xaa, 0x02, 0x1a, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x26, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x5c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_authorizer_verification_v1_password_reset_service_proto_rawDescOnce sync.Once - file_authorizer_verification_v1_password_reset_service_proto_rawDescData = file_authorizer_verification_v1_password_reset_service_proto_rawDesc -) - -func file_authorizer_verification_v1_password_reset_service_proto_rawDescGZIP() []byte { - file_authorizer_verification_v1_password_reset_service_proto_rawDescOnce.Do(func() { - file_authorizer_verification_v1_password_reset_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_authorizer_verification_v1_password_reset_service_proto_rawDescData) - }) - return file_authorizer_verification_v1_password_reset_service_proto_rawDescData -} - -var file_authorizer_verification_v1_password_reset_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_authorizer_verification_v1_password_reset_service_proto_goTypes = []any{ - (*CreatePasswordResetRequest)(nil), // 0: authorizer.verification.v1.CreatePasswordResetRequest - (*CreatePasswordResetResponse)(nil), // 1: authorizer.verification.v1.CreatePasswordResetResponse - (*ConfirmPasswordResetRequest)(nil), // 2: authorizer.verification.v1.ConfirmPasswordResetRequest - (*ConfirmPasswordResetResponse)(nil), // 3: authorizer.verification.v1.ConfirmPasswordResetResponse -} -var file_authorizer_verification_v1_password_reset_service_proto_depIdxs = []int32{ - 0, // 0: authorizer.verification.v1.PasswordResetService.CreatePasswordReset:input_type -> authorizer.verification.v1.CreatePasswordResetRequest - 2, // 1: authorizer.verification.v1.PasswordResetService.ConfirmPasswordReset:input_type -> authorizer.verification.v1.ConfirmPasswordResetRequest - 1, // 2: authorizer.verification.v1.PasswordResetService.CreatePasswordReset:output_type -> authorizer.verification.v1.CreatePasswordResetResponse - 3, // 3: authorizer.verification.v1.PasswordResetService.ConfirmPasswordReset:output_type -> authorizer.verification.v1.ConfirmPasswordResetResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_authorizer_verification_v1_password_reset_service_proto_init() } -func file_authorizer_verification_v1_password_reset_service_proto_init() { - if File_authorizer_verification_v1_password_reset_service_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_authorizer_verification_v1_password_reset_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_authorizer_verification_v1_password_reset_service_proto_goTypes, - DependencyIndexes: file_authorizer_verification_v1_password_reset_service_proto_depIdxs, - MessageInfos: file_authorizer_verification_v1_password_reset_service_proto_msgTypes, - }.Build() - File_authorizer_verification_v1_password_reset_service_proto = out.File - file_authorizer_verification_v1_password_reset_service_proto_rawDesc = nil - file_authorizer_verification_v1_password_reset_service_proto_goTypes = nil - file_authorizer_verification_v1_password_reset_service_proto_depIdxs = nil -} diff --git a/gen/go/authorizer/verification/v1/password_reset_service.pb.gw.go b/gen/go/authorizer/verification/v1/password_reset_service.pb.gw.go deleted file mode 100644 index 97462402..00000000 --- a/gen/go/authorizer/verification/v1/password_reset_service.pb.gw.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: authorizer/verification/v1/password_reset_service.proto - -/* -Package verificationv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package verificationv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_PasswordResetService_CreatePasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client PasswordResetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePasswordResetRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreatePasswordReset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PasswordResetService_CreatePasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, server PasswordResetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePasswordResetRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreatePasswordReset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_PasswordResetService_ConfirmPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client PasswordResetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ConfirmPasswordResetRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["token"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "token") - } - - protoReq.Token, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "token", err) - } - - msg, err := client.ConfirmPasswordReset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PasswordResetService_ConfirmPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, server PasswordResetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ConfirmPasswordResetRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["token"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "token") - } - - protoReq.Token, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "token", err) - } - - msg, err := server.ConfirmPasswordReset(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterPasswordResetServiceHandlerServer registers the http handlers for service PasswordResetService to "mux". -// UnaryRPC :call PasswordResetServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPasswordResetServiceHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterPasswordResetServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PasswordResetServiceServer) error { - - mux.Handle("POST", pattern_PasswordResetService_CreatePasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.verification.v1.PasswordResetService/CreatePasswordReset", runtime.WithHTTPPathPattern("/v1/password-resets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PasswordResetService_CreatePasswordReset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PasswordResetService_CreatePasswordReset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_PasswordResetService_ConfirmPasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.verification.v1.PasswordResetService/ConfirmPasswordReset", runtime.WithHTTPPathPattern("/v1/password-resets/{token}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PasswordResetService_ConfirmPasswordReset_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PasswordResetService_ConfirmPasswordReset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterPasswordResetServiceHandlerFromEndpoint is same as RegisterPasswordResetServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterPasswordResetServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterPasswordResetServiceHandler(ctx, mux, conn) -} - -// RegisterPasswordResetServiceHandler registers the http handlers for service PasswordResetService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterPasswordResetServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterPasswordResetServiceHandlerClient(ctx, mux, NewPasswordResetServiceClient(conn)) -} - -// RegisterPasswordResetServiceHandlerClient registers the http handlers for service PasswordResetService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PasswordResetServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PasswordResetServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PasswordResetServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterPasswordResetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PasswordResetServiceClient) error { - - mux.Handle("POST", pattern_PasswordResetService_CreatePasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.verification.v1.PasswordResetService/CreatePasswordReset", runtime.WithHTTPPathPattern("/v1/password-resets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PasswordResetService_CreatePasswordReset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PasswordResetService_CreatePasswordReset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_PasswordResetService_ConfirmPasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.verification.v1.PasswordResetService/ConfirmPasswordReset", runtime.WithHTTPPathPattern("/v1/password-resets/{token}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PasswordResetService_ConfirmPasswordReset_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PasswordResetService_ConfirmPasswordReset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_PasswordResetService_CreatePasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "password-resets"}, "")) - - pattern_PasswordResetService_ConfirmPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "password-resets", "token"}, "")) -) - -var ( - forward_PasswordResetService_CreatePasswordReset_0 = runtime.ForwardResponseMessage - - forward_PasswordResetService_ConfirmPasswordReset_0 = runtime.ForwardResponseMessage -) diff --git a/gen/go/authorizer/verification/v1/password_reset_service_grpc.pb.go b/gen/go/authorizer/verification/v1/password_reset_service_grpc.pb.go deleted file mode 100644 index 181f2509..00000000 --- a/gen/go/authorizer/verification/v1/password_reset_service_grpc.pb.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: authorizer/verification/v1/password_reset_service.proto - -package verificationv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - PasswordResetService_CreatePasswordReset_FullMethodName = "/authorizer.verification.v1.PasswordResetService/CreatePasswordReset" - PasswordResetService_ConfirmPasswordReset_FullMethodName = "/authorizer.verification.v1.PasswordResetService/ConfirmPasswordReset" -) - -// PasswordResetServiceClient is the client API for PasswordResetService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// PasswordResetService models the forgot-password flow as a challenge -// resource: Create dispatches an email/SMS with a reset link; Confirm -// applies the new password using the link's token. -type PasswordResetServiceClient interface { - // CreatePasswordReset dispatches a reset notification. Returns 202. - // Always returns success even when the address is unknown (prevents - // account enumeration). - CreatePasswordReset(ctx context.Context, in *CreatePasswordResetRequest, opts ...grpc.CallOption) (*CreatePasswordResetResponse, error) - // ConfirmPasswordReset sets the user's new password using the token from - // the reset notification. - ConfirmPasswordReset(ctx context.Context, in *ConfirmPasswordResetRequest, opts ...grpc.CallOption) (*ConfirmPasswordResetResponse, error) -} - -type passwordResetServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPasswordResetServiceClient(cc grpc.ClientConnInterface) PasswordResetServiceClient { - return &passwordResetServiceClient{cc} -} - -func (c *passwordResetServiceClient) CreatePasswordReset(ctx context.Context, in *CreatePasswordResetRequest, opts ...grpc.CallOption) (*CreatePasswordResetResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreatePasswordResetResponse) - err := c.cc.Invoke(ctx, PasswordResetService_CreatePasswordReset_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *passwordResetServiceClient) ConfirmPasswordReset(ctx context.Context, in *ConfirmPasswordResetRequest, opts ...grpc.CallOption) (*ConfirmPasswordResetResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ConfirmPasswordResetResponse) - err := c.cc.Invoke(ctx, PasswordResetService_ConfirmPasswordReset_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PasswordResetServiceServer is the server API for PasswordResetService service. -// All implementations should embed UnimplementedPasswordResetServiceServer -// for forward compatibility. -// -// PasswordResetService models the forgot-password flow as a challenge -// resource: Create dispatches an email/SMS with a reset link; Confirm -// applies the new password using the link's token. -type PasswordResetServiceServer interface { - // CreatePasswordReset dispatches a reset notification. Returns 202. - // Always returns success even when the address is unknown (prevents - // account enumeration). - CreatePasswordReset(context.Context, *CreatePasswordResetRequest) (*CreatePasswordResetResponse, error) - // ConfirmPasswordReset sets the user's new password using the token from - // the reset notification. - ConfirmPasswordReset(context.Context, *ConfirmPasswordResetRequest) (*ConfirmPasswordResetResponse, error) -} - -// UnimplementedPasswordResetServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedPasswordResetServiceServer struct{} - -func (UnimplementedPasswordResetServiceServer) CreatePasswordReset(context.Context, *CreatePasswordResetRequest) (*CreatePasswordResetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePasswordReset not implemented") -} -func (UnimplementedPasswordResetServiceServer) ConfirmPasswordReset(context.Context, *ConfirmPasswordResetRequest) (*ConfirmPasswordResetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ConfirmPasswordReset not implemented") -} -func (UnimplementedPasswordResetServiceServer) testEmbeddedByValue() {} - -// UnsafePasswordResetServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PasswordResetServiceServer will -// result in compilation errors. -type UnsafePasswordResetServiceServer interface { - mustEmbedUnimplementedPasswordResetServiceServer() -} - -func RegisterPasswordResetServiceServer(s grpc.ServiceRegistrar, srv PasswordResetServiceServer) { - // If the following call pancis, it indicates UnimplementedPasswordResetServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&PasswordResetService_ServiceDesc, srv) -} - -func _PasswordResetService_CreatePasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePasswordResetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PasswordResetServiceServer).CreatePasswordReset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PasswordResetService_CreatePasswordReset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PasswordResetServiceServer).CreatePasswordReset(ctx, req.(*CreatePasswordResetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PasswordResetService_ConfirmPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmPasswordResetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PasswordResetServiceServer).ConfirmPasswordReset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PasswordResetService_ConfirmPasswordReset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PasswordResetServiceServer).ConfirmPasswordReset(ctx, req.(*ConfirmPasswordResetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// PasswordResetService_ServiceDesc is the grpc.ServiceDesc for PasswordResetService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var PasswordResetService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.verification.v1.PasswordResetService", - HandlerType: (*PasswordResetServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreatePasswordReset", - Handler: _PasswordResetService_CreatePasswordReset_Handler, - }, - { - MethodName: "ConfirmPasswordReset", - Handler: _PasswordResetService_ConfirmPasswordReset_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authorizer/verification/v1/password_reset_service.proto", -} diff --git a/gen/openapi/authorizer.swagger.json b/gen/openapi/authorizer.swagger.json index ac1e4edd..ce3e3444 100644 --- a/gen/openapi/authorizer.swagger.json +++ b/gen/openapi/authorizer.swagger.json @@ -6,31 +6,7 @@ }, "tags": [ { - "name": "AuthzService" - }, - { - "name": "MetaService" - }, - { - "name": "MagicLinkService" - }, - { - "name": "SessionService" - }, - { - "name": "TokenService" - }, - { - "name": "UserService" - }, - { - "name": "EmailVerificationService" - }, - { - "name": "OtpChallengeService" - }, - { - "name": "PasswordResetService" + "name": "Authorizer" } ], "consumes": [ @@ -40,15 +16,15 @@ "application/json" ], "paths": { - "/v1/email-verifications": { + "/v1/deactivate_account": { "post": { - "summary": "CreateEmailVerification (re)sends the verification email for an\nunverified address. Returns 201; idempotent within a short window.", - "operationId": "EmailVerificationService_CreateEmailVerification", + "summary": "DeactivateAccount soft-deletes the caller's account and revokes all\nrefresh tokens as a side effect. OAuth has no concept of account\ndeactivation; this is the typed equivalent of SCIM PATCH active=false.", + "operationId": "Authorizer_DeactivateAccount", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreateEmailVerificationResponse" + "$ref": "#/definitions/v1DeactivateAccountResponse" } }, "default": { @@ -64,24 +40,23 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateEmailVerificationRequest" + "$ref": "#/definitions/v1DeactivateAccountRequest" } } ], "tags": [ - "EmailVerificationService" + "Authorizer" ] } }, - "/v1/email-verifications/{token}": { - "put": { - "summary": "ConfirmEmailVerification marks the verification complete. Returns a\nSession when the original signup was a self-sign-up flow (so the user\nis logged in immediately); otherwise returns the empty Session.", - "operationId": "EmailVerificationService_ConfirmEmailVerification", + "/v1/forgot_password": { + "post": { + "operationId": "Authorizer_ForgotPassword", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ConfirmEmailVerificationResponse" + "$ref": "#/definitions/v1ForgotPasswordResponse" } }, "default": { @@ -92,35 +67,29 @@ } }, "parameters": [ - { - "name": "token", - "in": "path", - "required": true, - "type": "string" - }, { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/EmailVerificationServiceConfirmEmailVerificationBody" + "$ref": "#/definitions/v1ForgotPasswordRequest" } } ], "tags": [ - "EmailVerificationService" + "Authorizer" ] } }, - "/v1/magic-links": { + "/v1/login": { "post": { - "summary": "CreateMagicLink dispatches a magic-link email. Returns 202: the email\nis sent asynchronously; the link itself drives session creation later.", - "operationId": "MagicLinkService_CreateMagicLink", + "summary": "Login authenticates with email/phone + password.", + "operationId": "Authorizer_Login", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreateMagicLinkResponse" + "$ref": "#/definitions/v1LoginResponse" } }, "default": { @@ -136,24 +105,24 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateMagicLinkRequest" + "$ref": "#/definitions/v1LoginRequest" } } ], "tags": [ - "MagicLinkService" + "Authorizer" ] } }, - "/v1/meta": { + "/v1/logout": { "get": { - "summary": "GetMeta returns the server's feature-flag and provider configuration.\nUsed by SPAs to decide which login UIs to render.", - "operationId": "MetaService_GetMeta", + "summary": "Logout ends the caller's current session.", + "operationId": "Authorizer_Logout", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetMetaResponse" + "$ref": "#/definitions/v1LogoutResponse" } }, "default": { @@ -164,19 +133,19 @@ } }, "tags": [ - "MetaService" + "Authorizer" ] } }, - "/v1/otp-challenges": { + "/v1/magic_link_login": { "post": { - "summary": "CreateOtpChallenge (re)sends an OTP to the address tied to an\nin-progress login. Returns 201.", - "operationId": "OtpChallengeService_CreateOtpChallenge", + "summary": "MagicLinkLogin dispatches a passwordless email link. The clicked link\nhits the existing /verify_email browser handler.", + "operationId": "Authorizer_MagicLinkLogin", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreateOtpChallengeResponse" + "$ref": "#/definitions/v1MagicLinkLoginResponse" } }, "default": { @@ -192,24 +161,24 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateOtpChallengeRequest" + "$ref": "#/definitions/v1MagicLinkLoginRequest" } } ], "tags": [ - "OtpChallengeService" + "Authorizer" ] } }, - "/v1/otp-challenges/{challenge_id}": { - "put": { - "summary": "ConfirmOtpChallenge verifies the supplied OTP and, on success, returns\na Session for the user. Browser callers also receive Set-Cookie.", - "operationId": "OtpChallengeService_ConfirmOtpChallenge", + "/v1/meta": { + "get": { + "summary": "Meta returns server feature flags. No auth required.", + "operationId": "Authorizer_Meta", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ConfirmOtpChallengeResponse" + "$ref": "#/definitions/v1MetaResponse" } }, "default": { @@ -219,37 +188,20 @@ } } }, - "parameters": [ - { - "name": "challenge_id", - "description": "Opaque challenge id (today: the email / phone the OTP was sent to).", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/OtpChallengeServiceConfirmOtpChallengeBody" - } - } - ], "tags": [ - "OtpChallengeService" + "Authorizer" ] } }, - "/v1/password-resets": { - "post": { - "summary": "CreatePasswordReset dispatches a reset notification. Returns 202.\nAlways returns success even when the address is unknown (prevents\naccount enumeration).", - "operationId": "PasswordResetService_CreatePasswordReset", + "/v1/permissions": { + "get": { + "summary": "Permissions returns the caller's effective (resource, scope) pairs.", + "operationId": "Authorizer_Permissions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreatePasswordResetResponse" + "$ref": "#/definitions/v1PermissionsResponse" } }, "default": { @@ -259,30 +211,20 @@ } } }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1CreatePasswordResetRequest" - } - } - ], "tags": [ - "PasswordResetService" + "Authorizer" ] } }, - "/v1/password-resets/{token}": { - "put": { - "summary": "ConfirmPasswordReset sets the user's new password using the token from\nthe reset notification.", - "operationId": "PasswordResetService_ConfirmPasswordReset", + "/v1/profile": { + "get": { + "summary": "Profile returns the authenticated user.", + "operationId": "Authorizer_Profile", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ConfirmPasswordResetResponse" + "$ref": "#/definitions/v1ProfileResponse" } }, "default": { @@ -292,37 +234,19 @@ } } }, - "parameters": [ - { - "name": "token", - "description": "The token from the reset email/SMS; for SMS flows it's the OTP value.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PasswordResetServiceConfirmPasswordResetBody" - } - } - ], "tags": [ - "PasswordResetService" + "Authorizer" ] } }, - "/v1/refresh-tokens/{refresh_token}": { - "delete": { - "summary": "RevokeRefreshToken invalidates a refresh token. Typed mirror of\nRFC 7009 `POST /oauth/revoke`.", - "operationId": "TokenService_RevokeRefreshToken", + "/v1/resend_otp": { + "post": { + "operationId": "Authorizer_ResendOtp", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RevokeRefreshTokenResponse" + "$ref": "#/definitions/v1ResendOtpResponse" } }, "default": { @@ -334,26 +258,27 @@ }, "parameters": [ { - "name": "refresh_token", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/v1ResendOtpRequest" + } } ], "tags": [ - "TokenService" + "Authorizer" ] } }, - "/v1/sessions": { + "/v1/resend_verify_email": { "post": { - "summary": "CreateSession authenticates a user and returns a new Session. The\nrequest carries exactly one credential type via `oneof grant`. Browser\ncallers (REST) additionally receive Set-Cookie headers. The OAuth2\ntoken endpoint at POST /oauth/token remains the spec-compliant\nalternative for OAuth clients.", - "operationId": "SessionService_CreateSession", + "operationId": "Authorizer_ResendVerifyEmail", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreateSessionResponse" + "$ref": "#/definitions/v1ResendVerifyEmailResponse" } }, "default": { @@ -369,24 +294,23 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateSessionRequest" + "$ref": "#/definitions/v1ResendVerifyEmailRequest" } } ], "tags": [ - "SessionService" + "Authorizer" ] } }, - "/v1/sessions/me": { - "get": { - "summary": "GetCurrentSession returns the session bound to the caller's cookie or\nbearer token. Returns NOT_FOUND when unauthenticated.", - "operationId": "SessionService_GetCurrentSession", + "/v1/reset_password": { + "post": { + "operationId": "Authorizer_ResetPassword", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetCurrentSessionResponse" + "$ref": "#/definitions/v1ResetPasswordResponse" } }, "default": { @@ -398,44 +322,28 @@ }, "parameters": [ { - "name": "roles", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "scope", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "state", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ResetPasswordRequest" + } } ], "tags": [ - "SessionService" + "Authorizer" ] - }, - "delete": { - "summary": "DeleteSession ends the caller's current session. Always returns empty\non success, even if no session was active (idempotent).", - "operationId": "SessionService_DeleteSession", + } + }, + "/v1/revoke": { + "post": { + "summary": "Revoke invalidates a refresh token. Typed mirror of RFC 7009.", + "operationId": "Authorizer_Revoke", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DeleteSessionResponse" + "$ref": "#/definitions/v1RevokeResponse" } }, "default": { @@ -445,20 +353,30 @@ } } }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RevokeRequest" + } + } + ], "tags": [ - "SessionService" + "Authorizer" ] } }, - "/v1/sessions/validations": { + "/v1/session": { "post": { - "summary": "CreateSessionValidation validates a cookie/token held by a third party\n— the typed equivalent of \"is this session real?\" used by backend\nservices validating tokens forwarded by an upstream proxy.", - "operationId": "SessionService_CreateSessionValidation", + "summary": "Session returns the AuthResponse bound to the caller's cookie/bearer.", + "operationId": "Authorizer_Session", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreateSessionValidationResponse" + "$ref": "#/definitions/v1SessionResponse" } }, "default": { @@ -474,24 +392,24 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateSessionValidationRequest" + "$ref": "#/definitions/v1SessionRequest" } } ], "tags": [ - "SessionService" + "Authorizer" ] } }, - "/v1/token-validations": { + "/v1/signup": { "post": { - "summary": "CreateTokenValidation validates a JWT and returns its claims. Equivalent\nto GraphQL validate_jwt_token.", - "operationId": "TokenService_CreateTokenValidation", + "summary": "Signup registers a new user. Public; requires sign-up enabled in config.\nReturns AuthResponse with tokens + (browser callers) Set-Cookie headers.", + "operationId": "Authorizer_Signup", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreateTokenValidationResponse" + "$ref": "#/definitions/v1SignupResponse" } }, "default": { @@ -507,24 +425,23 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateTokenValidationRequest" + "$ref": "#/definitions/v1SignupRequest" } } ], "tags": [ - "TokenService" + "Authorizer" ] } }, - "/v1/users": { + "/v1/update_profile": { "post": { - "summary": "CreateUser registers a new user account. Public — requires sign-up\nenabled in server config. On success returns tokens and (for browser\ncallers) Set-Cookie headers.", - "operationId": "UserService_CreateUser", + "operationId": "Authorizer_UpdateProfile", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreateUserResponse" + "$ref": "#/definitions/v1UpdateProfileResponse" } }, "default": { @@ -540,24 +457,23 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateUserRequest" + "$ref": "#/definitions/v1UpdateProfileRequest" } } ], "tags": [ - "UserService" + "Authorizer" ] } }, - "/v1/users/me": { - "get": { - "summary": "GetUser returns a single user. On this surface, only name=\"users/me\" is\naccepted; admin reads remain on GraphQL.", - "operationId": "UserService_GetUser", + "/v1/validate_jwt_token": { + "post": { + "operationId": "Authorizer_ValidateJwtToken", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetUserResponse" + "$ref": "#/definitions/v1ValidateJwtTokenResponse" } }, "default": { @@ -569,25 +485,27 @@ }, "parameters": [ { - "name": "name", - "description": "Must be \"users/me\" on this v1 surface.", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ValidateJwtTokenRequest" + } } ], "tags": [ - "UserService" + "Authorizer" ] - }, - "delete": { - "summary": "DeleteUser deactivates the caller's account (soft delete). All of the\nuser's refresh tokens are revoked as a side effect. OAuth has no\nstandard concept of account deactivation — this method is the typed\nequivalent of SCIM `PATCH /Users/{id} {active:false}`.", - "operationId": "UserService_DeleteUser", + } + }, + "/v1/validate_session": { + "post": { + "operationId": "Authorizer_ValidateSession", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DeleteUserResponse" + "$ref": "#/definitions/v1ValidateSessionResponse" } }, "default": { @@ -599,25 +517,27 @@ }, "parameters": [ { - "name": "name", - "description": "Must be \"users/me\" on this v1 surface.", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ValidateSessionRequest" + } } ], "tags": [ - "UserService" + "Authorizer" ] - }, - "patch": { - "summary": "UpdateUser patches a user. On this surface, only name=\"users/me\" is\naccepted. The optional field_mask controls which fields are updated.", - "operationId": "UserService_UpdateUser", + } + }, + "/v1/verify_email": { + "post": { + "operationId": "Authorizer_VerifyEmail", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateUserResponse" + "$ref": "#/definitions/v1VerifyEmailResponse" } }, "default": { @@ -629,48 +549,27 @@ }, "parameters": [ { - "name": "user", - "description": "The user to update. user.id should be \"users/me\" or omitted.", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1User" + "$ref": "#/definitions/v1VerifyEmailRequest" } - }, - { - "name": "old_password", - "description": "Optional credential change. Validated cross-field by the handler.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "new_password", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "confirm_new_password", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ - "UserService" + "Authorizer" ] } }, - "/v1/users/me/permissions": { - "get": { - "summary": "ListMyPermissions returns every (resource, scope) pair the caller is\nallowed to act on, derived from their roles and the policy engine.", - "operationId": "AuthzService_ListMyPermissions", + "/v1/verify_otp": { + "post": { + "operationId": "Authorizer_VerifyOtp", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListMyPermissionsResponse" + "$ref": "#/definitions/v1VerifyOtpResponse" } }, "default": { @@ -680,79 +579,88 @@ } } }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1VerifyOtpRequest" + } + } + ], "tags": [ - "AuthzService" + "Authorizer" ] } } }, "definitions": { - "EmailVerificationServiceConfirmEmailVerificationBody": { + "authorizerv1Meta": { "type": "object", "properties": { - "state": { + "version": { "type": "string" - } - } - }, - "OtpChallengeServiceConfirmOtpChallengeBody": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "The OTP value the user entered." - }, - "email": { - "type": "string", - "description": "Either email or phone_number identifies the user (mirrors challenge_id\nfor now; reserved for a future opaque challenge-id design)." }, - "phone_number": { + "client_id": { "type": "string" }, - "is_totp": { + "is_google_login_enabled": { "type": "boolean" }, - "state": { - "type": "string" - } - } - }, - "PasswordResetServiceConfirmPasswordResetBody": { - "type": "object", - "properties": { - "phone_number": { - "type": "string", - "description": "For SMS flows: the user identifier the OTP was bound to." + "is_facebook_login_enabled": { + "type": "boolean" }, - "password": { - "type": "string" + "is_github_login_enabled": { + "type": "boolean" }, - "confirm_password": { - "type": "string" - } - } - }, - "authorizersessionv1PermissionRef": { - "type": "object", - "properties": { - "resource": { - "type": "string" + "is_linkedin_login_enabled": { + "type": "boolean" }, - "scope": { - "type": "string" - } - } - }, - "authorizertokenv1PermissionRef": { - "type": "object", - "properties": { - "resource": { - "type": "string" + "is_apple_login_enabled": { + "type": "boolean" }, - "scope": { - "type": "string" + "is_discord_login_enabled": { + "type": "boolean" + }, + "is_twitter_login_enabled": { + "type": "boolean" + }, + "is_microsoft_login_enabled": { + "type": "boolean" + }, + "is_twitch_login_enabled": { + "type": "boolean" + }, + "is_roblox_login_enabled": { + "type": "boolean" + }, + "is_email_verification_enabled": { + "type": "boolean" + }, + "is_basic_authentication_enabled": { + "type": "boolean" + }, + "is_magic_link_login_enabled": { + "type": "boolean" + }, + "is_sign_up_enabled": { + "type": "boolean" + }, + "is_strong_password_enabled": { + "type": "boolean" + }, + "is_multi_factor_auth_enabled": { + "type": "boolean" + }, + "is_mobile_basic_authentication_enabled": { + "type": "boolean" + }, + "is_phone_verification_enabled": { + "type": "boolean" } - } + }, + "description": "Meta mirrors the GraphQL Meta type — server feature flags + provider\navailability, returned by the Meta query." }, "protobufAny": { "type": "object", @@ -799,46 +707,57 @@ }, "description": "AppData is a free-form key/value bag stored against a user. Mirrors the\nGraphQL `Map` scalar. Values are JSON-typed (string, number, bool, null,\nnested object, nested array) to match what the existing storage layer\naccepts." }, - "v1ConfirmEmailVerificationResponse": { - "type": "object", - "properties": { - "session": { - "$ref": "#/definitions/v1Session" - } - } - }, - "v1ConfirmOtpChallengeResponse": { - "type": "object", - "properties": { - "session": { - "$ref": "#/definitions/v1Session" - } - } - }, - "v1ConfirmPasswordResetResponse": { + "v1AuthResponse": { "type": "object", "properties": { "message": { "type": "string" - } - } - }, - "v1CreateEmailVerificationRequest": { - "type": "object", - "properties": { - "email": { - "type": "string" }, - "identifier": { - "type": "string", - "description": "Verification identifier (typeof verification, e.g. basic-auth-signup)." + "should_show_email_otp_screen": { + "type": "boolean" }, - "state": { - "type": "string" - } - } + "should_show_mobile_otp_screen": { + "type": "boolean" + }, + "should_show_totp_screen": { + "type": "boolean" + }, + "access_token": { + "type": "string" + }, + "id_token": { + "type": "string" + }, + "refresh_token": { + "type": "string" + }, + "expires_in": { + "type": "string", + "format": "int64" + }, + "user": { + "$ref": "#/definitions/v1User" + }, + "authenticator_scanner_image": { + "type": "string", + "description": "TOTP enrolment artifacts (populated only when this AuthResponse\ninitiates TOTP setup; one-time, never re-shown)." + }, + "authenticator_secret": { + "type": "string" + }, + "authenticator_recovery_codes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "AuthResponse mirrors the GraphQL AuthResponse type. Returned (wrapped) by\nevery method that produces a session: Signup, Login, MagicLinkLogin,\nVerifyEmail, VerifyOtp, Session." + }, + "v1DeactivateAccountRequest": { + "type": "object" }, - "v1CreateEmailVerificationResponse": { + "v1DeactivateAccountResponse": { "type": "object", "properties": { "message": { @@ -846,23 +765,14 @@ } } }, - "v1CreateMagicLinkRequest": { + "v1ForgotPasswordRequest": { "type": "object", "properties": { "email": { "type": "string" }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "scope": { - "type": "array", - "items": { - "type": "string" - } + "phone_number": { + "type": "string" }, "state": { "type": "string" @@ -872,30 +782,56 @@ } } }, - "v1CreateMagicLinkResponse": { + "v1ForgotPasswordResponse": { "type": "object", "properties": { "message": { "type": "string" + }, + "should_show_mobile_otp_screen": { + "type": "boolean", + "description": "For SMS-driven flows the UI may need to render an OTP entry screen." } } }, - "v1CreateOtpChallengeRequest": { + "v1LoginRequest": { "type": "object", "properties": { "email": { - "type": "string", - "description": "Exactly one of email / phone_number is required." + "type": "string" }, "phone_number": { "type": "string" }, + "password": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "scope": { + "type": "array", + "items": { + "type": "string" + } + }, "state": { "type": "string" } } }, - "v1CreateOtpChallengeResponse": { + "v1LoginResponse": { + "type": "object", + "properties": { + "auth": { + "$ref": "#/definitions/v1AuthResponse" + } + } + }, + "v1LogoutResponse": { "type": "object", "properties": { "message": { @@ -903,16 +839,24 @@ } } }, - "v1CreatePasswordResetRequest": { + "v1MagicLinkLoginRequest": { "type": "object", "properties": { "email": { - "type": "string", - "description": "Exactly one of email / phone_number is required." - }, - "phone_number": { "type": "string" }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "scope": { + "type": "array", + "items": { + "type": "string" + } + }, "state": { "type": "string" }, @@ -921,132 +865,196 @@ } } }, - "v1CreatePasswordResetResponse": { + "v1MagicLinkLoginResponse": { "type": "object", "properties": { "message": { "type": "string" - }, - "should_show_mobile_otp_screen": { - "type": "boolean", - "description": "Mobile callers may need to render an OTP entry screen (when reset is\nSMS-driven). Mirrors GraphQL ForgotPasswordResponse." } } }, - "v1CreateSessionRequest": { + "v1MetaResponse": { "type": "object", "properties": { - "password": { - "$ref": "#/definitions/v1PasswordGrant" - }, - "otp": { - "$ref": "#/definitions/v1OtpGrant" - }, - "magic_link": { - "$ref": "#/definitions/v1MagicLinkGrant" - }, - "refresh_token": { - "$ref": "#/definitions/v1RefreshTokenGrant" + "meta": { + "$ref": "#/definitions/authorizerv1Meta" + } + } + }, + "v1Permission": { + "type": "object", + "properties": { + "resource": { + "type": "string" }, - "roles": { - "type": "array", - "items": { - "type": "string" - } + "scope": { + "type": "string" + } + }, + "description": "Permission is one (resource, scope) pair the caller is allowed to act on." + }, + "v1PermissionInput": { + "type": "object", + "properties": { + "resource": { + "type": "string" }, "scope": { + "type": "string" + } + }, + "description": "PermissionInput is the request-side mirror of Permission used by\nmethods that take a list of required permissions." + }, + "v1PermissionsResponse": { + "type": "object", + "properties": { + "permissions": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/v1Permission" } + } + } + }, + "v1ProfileResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/v1User" + } + } + }, + "v1ResendOtpRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "phone_number": { + "type": "string" }, "state": { - "type": "string", - "description": "OAuth2 authorization-code flow state echoed back via c_hash." + "type": "string" } } }, - "v1CreateSessionResponse": { + "v1ResendOtpResponse": { "type": "object", "properties": { - "session": { - "$ref": "#/definitions/v1Session" + "message": { + "type": "string" } } }, - "v1CreateSessionValidationRequest": { + "v1ResendVerifyEmailRequest": { "type": "object", "properties": { - "cookie": { - "type": "string", - "description": "Cookie value (typically the fingerprint hash) to validate." + "email": { + "type": "string" }, - "roles": { - "type": "array", - "items": { - "type": "string" - } + "identifier": { + "type": "string" }, - "required_permissions": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/authorizersessionv1PermissionRef" - } + "state": { + "type": "string" } } }, - "v1CreateSessionValidationResponse": { + "v1ResendVerifyEmailResponse": { "type": "object", "properties": { - "result": { - "$ref": "#/definitions/v1SessionValidationResult" + "message": { + "type": "string" } } }, - "v1CreateTokenValidationRequest": { + "v1ResetPasswordRequest": { "type": "object", "properties": { - "token_type": { + "token": { "type": "string", - "description": "One of: \"access_token\", \"id_token\", \"refresh_token\"." + "description": "For email flows: the token from the reset email. For SMS flows: the OTP." }, - "token": { + "otp": { + "type": "string" + }, + "phone_number": { + "type": "string" + }, + "password": { "type": "string" }, + "confirm_password": { + "type": "string" + } + } + }, + "v1ResetPasswordResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "v1RevokeRequest": { + "type": "object", + "properties": { + "refresh_token": { + "type": "string" + } + } + }, + "v1RevokeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "v1SessionRequest": { + "type": "object", + "properties": { "roles": { "type": "array", "items": { "type": "string" } }, + "scope": { + "type": "array", + "items": { + "type": "string" + } + }, + "state": { + "type": "string" + }, "required_permissions": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/authorizertokenv1PermissionRef" - } + "$ref": "#/definitions/v1PermissionInput" + }, + "description": "Optional AND-combined permission filter; deny if any is missing." } } }, - "v1CreateTokenValidationResponse": { + "v1SessionResponse": { "type": "object", "properties": { - "is_valid": { - "type": "boolean" - }, - "claims": { - "type": "object", - "description": "Free-form JWT claims; matches GraphQL ValidateJWTTokenResponse.claims." + "auth": { + "$ref": "#/definitions/v1AuthResponse" } } }, - "v1CreateUserRequest": { + "v1SignupRequest": { "type": "object", "properties": { "email": { - "type": "string", - "description": "Email or phone_number must be set (validated at the handler)." + "type": "string" }, "phone_number": { "type": "string" @@ -1097,275 +1105,73 @@ "type": "boolean" }, "state": { - "type": "string", - "description": "OAuth2 authorization-code flow state echoed back via c_hash." + "type": "string" }, "app_data": { "$ref": "#/definitions/v1AppData" } } }, - "v1CreateUserResponse": { + "v1SignupResponse": { "type": "object", "properties": { - "message": { - "type": "string", - "description": "Human-readable message describing the outcome (e.g. \"Verification email\nsent\" vs \"Signed up successfully\")." + "auth": { + "$ref": "#/definitions/v1AuthResponse" + } + } + }, + "v1UpdateProfileRequest": { + "type": "object", + "properties": { + "old_password": { + "type": "string" }, - "should_show_email_otp_screen": { - "type": "boolean" + "new_password": { + "type": "string" }, - "should_show_mobile_otp_screen": { - "type": "boolean" + "confirm_new_password": { + "type": "string" }, - "should_show_totp_screen": { - "type": "boolean" + "email": { + "type": "string" }, - "access_token": { + "given_name": { "type": "string" }, - "id_token": { + "family_name": { "type": "string" }, - "refresh_token": { + "middle_name": { "type": "string" }, - "expires_in": { - "type": "string", - "format": "int64" - }, - "user": { - "$ref": "#/definitions/v1User" - } - } - }, - "v1DeleteSessionResponse": { - "type": "object" - }, - "v1DeleteUserResponse": { - "type": "object" - }, - "v1GetCurrentSessionResponse": { - "type": "object", - "properties": { - "session": { - "$ref": "#/definitions/v1Session" - } - } - }, - "v1GetMetaResponse": { - "type": "object", - "properties": { - "version": { + "nickname": { "type": "string" }, - "client_id": { + "gender": { "type": "string" }, - "is_google_login_enabled": { - "type": "boolean" - }, - "is_facebook_login_enabled": { - "type": "boolean" - }, - "is_github_login_enabled": { - "type": "boolean" - }, - "is_linkedin_login_enabled": { - "type": "boolean" - }, - "is_apple_login_enabled": { - "type": "boolean" - }, - "is_discord_login_enabled": { - "type": "boolean" - }, - "is_twitter_login_enabled": { - "type": "boolean" - }, - "is_microsoft_login_enabled": { - "type": "boolean" - }, - "is_twitch_login_enabled": { - "type": "boolean" - }, - "is_roblox_login_enabled": { - "type": "boolean" - }, - "is_email_verification_enabled": { - "type": "boolean" - }, - "is_basic_authentication_enabled": { - "type": "boolean" - }, - "is_magic_link_login_enabled": { - "type": "boolean" - }, - "is_sign_up_enabled": { - "type": "boolean" - }, - "is_strong_password_enabled": { - "type": "boolean" - }, - "is_multi_factor_auth_enabled": { - "type": "boolean" - }, - "is_mobile_basic_authentication_enabled": { - "type": "boolean" - }, - "is_phone_verification_enabled": { - "type": "boolean" - } - }, - "description": "GetMetaResponse mirrors the GraphQL Meta type 1:1. Field naming uses the\nexisting snake_case names so existing consumers see the same shape over\nREST." - }, - "v1GetUserResponse": { - "type": "object", - "properties": { - "user": { - "$ref": "#/definitions/v1User" - } - } - }, - "v1ListMyPermissionsResponse": { - "type": "object", - "properties": { - "permissions": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Permission" - } - } - } - }, - "v1MagicLinkGrant": { - "type": "object", - "properties": { - "token": { - "type": "string", - "description": "The token from the magic-link email URL." - } - } - }, - "v1OtpGrant": { - "type": "object", - "properties": { - "email": { + "birthdate": { "type": "string" }, "phone_number": { "type": "string" }, - "otp": { + "picture": { "type": "string" }, - "is_totp": { + "is_multi_factor_auth_enabled": { "type": "boolean" - } - } - }, - "v1PasswordGrant": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Exactly one of email / phone_number is required." }, - "phone_number": { - "type": "string" - }, - "password": { - "type": "string" - } - } - }, - "v1Permission": { - "type": "object", - "properties": { - "resource": { - "type": "string" - }, - "scope": { - "type": "string" - } - } - }, - "v1RefreshTokenGrant": { - "type": "object", - "properties": { - "refresh_token": { - "type": "string" + "app_data": { + "$ref": "#/definitions/v1AppData" } } }, - "v1RevokeRefreshTokenResponse": { - "type": "object" - }, - "v1Session": { + "v1UpdateProfileResponse": { "type": "object", "properties": { "message": { "type": "string" - }, - "should_show_email_otp_screen": { - "type": "boolean" - }, - "should_show_mobile_otp_screen": { - "type": "boolean" - }, - "should_show_totp_screen": { - "type": "boolean" - }, - "access_token": { - "type": "string" - }, - "id_token": { - "type": "string" - }, - "refresh_token": { - "type": "string" - }, - "expires_in": { - "type": "string", - "format": "int64" - }, - "user": { - "$ref": "#/definitions/v1User" - }, - "authenticator_scanner_image": { - "type": "string", - "description": "TOTP enrolment artifacts (set only when CreateSession initiates TOTP setup)." - }, - "authenticator_secret": { - "type": "string" - }, - "authenticator_recovery_codes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "Session is what CreateSession returns: tokens plus enough user context to\navoid a follow-up GetUser. Mirrors the GraphQL AuthResponse type 1:1 in\nfield naming." - }, - "v1SessionValidationResult": { - "type": "object", - "properties": { - "is_valid": { - "type": "boolean" - }, - "user": { - "$ref": "#/definitions/v1User" - } - }, - "description": "SessionValidationResult is what CreateSessionValidation returns." - }, - "v1UpdateUserResponse": { - "type": "object", - "properties": { - "user": { - "$ref": "#/definitions/v1User" } } }, @@ -1442,7 +1248,123 @@ "description": "Free-form key/value bag — same as GraphQL `app_data: Map`." } }, - "description": "User mirrors the GraphQL User type. Field names match the existing\nJSON/GraphQL surface so REST callers see the same shape.\n\nThe canonical resource name is either \"users/me\" (the caller) or\n\"users/{id}\". Other RPCs accept this string form via the `name` field on\ntheir requests." + "description": "User mirrors the GraphQL User type. Returned by Profile and embedded in\nAuthResponse." + }, + "v1ValidateJwtTokenRequest": { + "type": "object", + "properties": { + "token_type": { + "type": "string" + }, + "token": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "required_permissions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1PermissionInput" + } + } + } + }, + "v1ValidateJwtTokenResponse": { + "type": "object", + "properties": { + "is_valid": { + "type": "boolean" + }, + "claims": { + "$ref": "#/definitions/v1AppData", + "description": "Free-form JWT claims (matches GraphQL ValidateJWTTokenResponse.claims)." + } + } + }, + "v1ValidateSessionRequest": { + "type": "object", + "properties": { + "cookie": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "required_permissions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1PermissionInput" + } + } + } + }, + "v1ValidateSessionResponse": { + "type": "object", + "properties": { + "is_valid": { + "type": "boolean" + }, + "user": { + "$ref": "#/definitions/v1User" + } + } + }, + "v1VerifyEmailRequest": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1VerifyEmailResponse": { + "type": "object", + "properties": { + "auth": { + "$ref": "#/definitions/v1AuthResponse" + } + } + }, + "v1VerifyOtpRequest": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Exactly one of email / phone_number is required." + }, + "phone_number": { + "type": "string" + }, + "otp": { + "type": "string" + }, + "is_totp": { + "type": "boolean" + }, + "state": { + "type": "string" + } + } + }, + "v1VerifyOtpResponse": { + "type": "object", + "properties": { + "auth": { + "$ref": "#/definitions/v1AuthResponse" + } + } } } } diff --git a/internal/gateway/mount.go b/internal/gateway/mount.go index aa205f53..6a163f1a 100644 --- a/internal/gateway/mount.go +++ b/internal/gateway/mount.go @@ -20,12 +20,7 @@ import ( "google.golang.org/grpc/test/bufconn" "google.golang.org/protobuf/encoding/protojson" - authzv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/authz/v1" - metav1 "github.com/authorizerdev/authorizer/gen/go/authorizer/meta/v1" - sessionv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/session/v1" - tokenv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/token/v1" - userv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/user/v1" - verificationv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/verification/v1" + authorizerv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/v1" ) // bufconn size; large enough that in-process gateway calls never block. @@ -83,21 +78,7 @@ func Handler(ctx context.Context, grpcSrv *grpc.Server) (http.Handler, func(), e } func registerAll(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - registrars := []func(context.Context, *runtime.ServeMux, *grpc.ClientConn) error{ - metav1.RegisterMetaServiceHandler, - userv1.RegisterUserServiceHandler, - sessionv1.RegisterSessionServiceHandler, - sessionv1.RegisterMagicLinkServiceHandler, - verificationv1.RegisterEmailVerificationServiceHandler, - verificationv1.RegisterPasswordResetServiceHandler, - verificationv1.RegisterOtpChallengeServiceHandler, - tokenv1.RegisterTokenServiceHandler, - authzv1.RegisterAuthzServiceHandler, - } - for _, fn := range registrars { - if err := fn(ctx, mux, conn); err != nil { - return err - } - } - return nil + // Single Authorizer service. As more services land (admin-side ones + // that today stay GraphQL-only), add their registrar here. + return authorizerv1.RegisterAuthorizerHandler(ctx, mux, conn) } diff --git a/internal/grpcsrv/handlers/authorizer.go b/internal/grpcsrv/handlers/authorizer.go new file mode 100644 index 00000000..d570e1f6 --- /dev/null +++ b/internal/grpcsrv/handlers/authorizer.go @@ -0,0 +1,60 @@ +// Package handlers contains the AuthorizerHandler, the single gRPC service +// handler for Authorizer's public API. Methods that have already been +// migrated into internal/service (currently just Meta) delegate there; the +// rest embed the proto-generated UnimplementedAuthorizerServer so they +// return codes.Unimplemented until their underlying service method lands. +// +// As each follow-up PR migrates one GraphQL op into internal/service, the +// corresponding stub here is replaced with a real delegation following the +// Meta pattern. Tests in internal/integration_tests/grpc_surface_test.go +// guard the Unimplemented contract until each migration ships. +package handlers + +import ( + "context" + + "github.com/authorizerdev/authorizer/internal/grpcsrv/transport" + "github.com/authorizerdev/authorizer/internal/service" + + authorizerv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/v1" +) + +// AuthorizerHandler implements authorizer.v1.Authorizer. The single struct +// satisfies the entire service interface; methods become real one at a time. +type AuthorizerHandler struct { + authorizerv1.UnimplementedAuthorizerServer + Service service.Provider +} + +// Meta delegates to service.Meta and projects the GraphQL Meta model into +// the proto MetaResponse. +func (h *AuthorizerHandler) Meta(ctx context.Context, _ *authorizerv1.MetaRequest) (*authorizerv1.MetaResponse, error) { + m, _, err := h.Service.Meta(ctx, transport.MetaFromGRPC(ctx)) + if err != nil { + return nil, err + } + return &authorizerv1.MetaResponse{ + Meta: &authorizerv1.Meta{ + Version: m.Version, + ClientId: m.ClientID, + IsGoogleLoginEnabled: m.IsGoogleLoginEnabled, + IsFacebookLoginEnabled: m.IsFacebookLoginEnabled, + IsGithubLoginEnabled: m.IsGithubLoginEnabled, + IsLinkedinLoginEnabled: m.IsLinkedinLoginEnabled, + IsAppleLoginEnabled: m.IsAppleLoginEnabled, + IsDiscordLoginEnabled: m.IsDiscordLoginEnabled, + IsTwitterLoginEnabled: m.IsTwitterLoginEnabled, + IsMicrosoftLoginEnabled: m.IsMicrosoftLoginEnabled, + IsTwitchLoginEnabled: m.IsTwitchLoginEnabled, + IsRobloxLoginEnabled: m.IsRobloxLoginEnabled, + IsEmailVerificationEnabled: m.IsEmailVerificationEnabled, + IsBasicAuthenticationEnabled: m.IsBasicAuthenticationEnabled, + IsMagicLinkLoginEnabled: m.IsMagicLinkLoginEnabled, + IsSignUpEnabled: m.IsSignUpEnabled, + IsStrongPasswordEnabled: m.IsStrongPasswordEnabled, + IsMultiFactorAuthEnabled: m.IsMultiFactorAuthEnabled, + IsMobileBasicAuthenticationEnabled: m.IsMobileBasicAuthenticationEnabled, + IsPhoneVerificationEnabled: m.IsPhoneVerificationEnabled, + }, + }, nil +} diff --git a/internal/grpcsrv/handlers/meta.go b/internal/grpcsrv/handlers/meta.go deleted file mode 100644 index 38f63913..00000000 --- a/internal/grpcsrv/handlers/meta.go +++ /dev/null @@ -1,51 +0,0 @@ -// Package handlers contains gRPC service handler implementations. Each -// service is a thin transport adapter: pull RequestMetadata out of the gRPC -// context, delegate to internal/service, project the result into the -// proto-generated response type. -package handlers - -import ( - "context" - - "github.com/authorizerdev/authorizer/internal/grpcsrv/transport" - "github.com/authorizerdev/authorizer/internal/service" - - metav1 "github.com/authorizerdev/authorizer/gen/go/authorizer/meta/v1" -) - -// MetaHandler implements authorizer.meta.v1.MetaService. -type MetaHandler struct { - metav1.UnimplementedMetaServiceServer - Service service.Provider -} - -// GetMeta delegates to service.Meta and projects the GraphQL Meta model into -// the proto GetMetaResponse. -func (h *MetaHandler) GetMeta(ctx context.Context, _ *metav1.GetMetaRequest) (*metav1.GetMetaResponse, error) { - m, _, err := h.Service.Meta(ctx, transport.MetaFromGRPC(ctx)) - if err != nil { - return nil, err - } - return &metav1.GetMetaResponse{ - Version: m.Version, - ClientId: m.ClientID, - IsGoogleLoginEnabled: m.IsGoogleLoginEnabled, - IsFacebookLoginEnabled: m.IsFacebookLoginEnabled, - IsGithubLoginEnabled: m.IsGithubLoginEnabled, - IsLinkedinLoginEnabled: m.IsLinkedinLoginEnabled, - IsAppleLoginEnabled: m.IsAppleLoginEnabled, - IsDiscordLoginEnabled: m.IsDiscordLoginEnabled, - IsTwitterLoginEnabled: m.IsTwitterLoginEnabled, - IsMicrosoftLoginEnabled: m.IsMicrosoftLoginEnabled, - IsTwitchLoginEnabled: m.IsTwitchLoginEnabled, - IsRobloxLoginEnabled: m.IsRobloxLoginEnabled, - IsEmailVerificationEnabled: m.IsEmailVerificationEnabled, - IsBasicAuthenticationEnabled: m.IsBasicAuthenticationEnabled, - IsMagicLinkLoginEnabled: m.IsMagicLinkLoginEnabled, - IsSignUpEnabled: m.IsSignUpEnabled, - IsStrongPasswordEnabled: m.IsStrongPasswordEnabled, - IsMultiFactorAuthEnabled: m.IsMultiFactorAuthEnabled, - IsMobileBasicAuthenticationEnabled: m.IsMobileBasicAuthenticationEnabled, - IsPhoneVerificationEnabled: m.IsPhoneVerificationEnabled, - }, nil -} diff --git a/internal/grpcsrv/handlers/stubs.go b/internal/grpcsrv/handlers/stubs.go deleted file mode 100644 index 015dad56..00000000 --- a/internal/grpcsrv/handlers/stubs.go +++ /dev/null @@ -1,65 +0,0 @@ -package handlers - -import ( - "github.com/authorizerdev/authorizer/internal/service" - - authzv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/authz/v1" - sessionv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/session/v1" - tokenv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/token/v1" - userv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/user/v1" - verificationv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/verification/v1" -) - -// The handlers below embed the proto-generated UnimplementedXServer types, -// which makes them all return codes.Unimplemented for every RPC. As each -// service's operations migrate into internal/service in subsequent PRs, -// individual methods are added here and override the unimplemented stubs. -// -// Keeping every service registered (even as a stub) means: -// - gRPC reflection lists the complete API surface from day one -// - clients can discover capability rather than getting "service not found" -// - the grpc-gateway mount registers all REST routes, returning -// codes.Unimplemented → HTTP 501 for unimplemented ops -// -// All handlers receive the shared service.Provider so the wire-up is in -// place for the migration; the Service field is unused on stubs today. - -type UserHandler struct { - userv1.UnimplementedUserServiceServer - Service service.Provider -} - -type SessionHandler struct { - sessionv1.UnimplementedSessionServiceServer - Service service.Provider -} - -type MagicLinkHandler struct { - sessionv1.UnimplementedMagicLinkServiceServer - Service service.Provider -} - -type EmailVerificationHandler struct { - verificationv1.UnimplementedEmailVerificationServiceServer - Service service.Provider -} - -type PasswordResetHandler struct { - verificationv1.UnimplementedPasswordResetServiceServer - Service service.Provider -} - -type OtpChallengeHandler struct { - verificationv1.UnimplementedOtpChallengeServiceServer - Service service.Provider -} - -type TokenHandler struct { - tokenv1.UnimplementedTokenServiceServer - Service service.Provider -} - -type AuthzHandler struct { - authzv1.UnimplementedAuthzServiceServer - Service service.Provider -} diff --git a/internal/grpcsrv/interceptors/interceptors_test.go b/internal/grpcsrv/interceptors/interceptors_test.go index 3a0a0a2b..007ba22a 100644 --- a/internal/grpcsrv/interceptors/interceptors_test.go +++ b/internal/grpcsrv/interceptors/interceptors_test.go @@ -13,8 +13,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - metav1 "github.com/authorizerdev/authorizer/gen/go/authorizer/meta/v1" - userv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/user/v1" + authorizerv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/v1" ) // info builds a *grpc.UnaryServerInfo for a fake RPC. The full-method name is @@ -91,15 +90,10 @@ func TestValidate_RejectsBadRequest(t *testing.T) { mw, err := Validate() require.NoError(t, err) - // CreateUserRequest enforces email format via buf.validate.field on the email - // field — sending an invalid email should fail the interceptor before any - // handler runs. - req := &userv1.CreateUserRequest{ - Email: "not-an-email", - Password: "x", - ConfirmPassword: "x", - } - _, err = mw(context.Background(), req, info("/svc/CreateUser"), func(_ context.Context, _ any) (any, error) { + // RevokeRequest enforces refresh_token min_len=1 via buf.validate.field + // — an empty string should fail the interceptor before any handler runs. + req := &authorizerv1.RevokeRequest{RefreshToken: ""} + _, err = mw(context.Background(), req, info("/authorizer.v1.Authorizer/Revoke"), func(_ context.Context, _ any) (any, error) { t.Fatal("handler must NOT run for an invalid request") return nil, nil }) @@ -112,9 +106,9 @@ func TestValidate_AllowsValidRequest(t *testing.T) { mw, err := Validate() require.NoError(t, err) called := false - _, err = mw(context.Background(), &metav1.GetMetaRequest{}, info("/svc/GetMeta"), func(_ context.Context, _ any) (any, error) { + _, err = mw(context.Background(), &authorizerv1.MetaRequest{}, info("/authorizer.v1.Authorizer/Meta"), func(_ context.Context, _ any) (any, error) { called = true - return &metav1.GetMetaResponse{}, nil + return &authorizerv1.MetaResponse{}, nil }) require.NoError(t, err) assert.True(t, called, "valid request must reach the handler") diff --git a/internal/grpcsrv/server.go b/internal/grpcsrv/server.go index 83dff7e6..c65826a6 100644 --- a/internal/grpcsrv/server.go +++ b/internal/grpcsrv/server.go @@ -19,12 +19,7 @@ import ( "github.com/authorizerdev/authorizer/internal/grpcsrv/interceptors" "github.com/authorizerdev/authorizer/internal/service" - authzv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/authz/v1" - metav1 "github.com/authorizerdev/authorizer/gen/go/authorizer/meta/v1" - sessionv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/session/v1" - tokenv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/token/v1" - userv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/user/v1" - verificationv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/verification/v1" + authorizerv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/v1" ) // Dependencies is the minimum set the gRPC server needs. @@ -58,18 +53,11 @@ func New(addr string, deps *Dependencies) (*Server, error) { ), ) - // Register every service. Real implementations override the stub's - // UnimplementedXServer; stubs return codes.Unimplemented until their - // service migrates from internal/graphql in a follow-up PR. - metav1.RegisterMetaServiceServer(srv, &handlers.MetaHandler{Service: deps.ServiceProvider}) - userv1.RegisterUserServiceServer(srv, &handlers.UserHandler{Service: deps.ServiceProvider}) - sessionv1.RegisterSessionServiceServer(srv, &handlers.SessionHandler{Service: deps.ServiceProvider}) - sessionv1.RegisterMagicLinkServiceServer(srv, &handlers.MagicLinkHandler{Service: deps.ServiceProvider}) - verificationv1.RegisterEmailVerificationServiceServer(srv, &handlers.EmailVerificationHandler{Service: deps.ServiceProvider}) - verificationv1.RegisterPasswordResetServiceServer(srv, &handlers.PasswordResetHandler{Service: deps.ServiceProvider}) - verificationv1.RegisterOtpChallengeServiceServer(srv, &handlers.OtpChallengeHandler{Service: deps.ServiceProvider}) - tokenv1.RegisterTokenServiceServer(srv, &handlers.TokenHandler{Service: deps.ServiceProvider}) - authzv1.RegisterAuthzServiceServer(srv, &handlers.AuthzHandler{Service: deps.ServiceProvider}) + // Register the single Authorizer service. AuthorizerHandler embeds + // UnimplementedAuthorizerServer, so any RPC whose method has not yet + // been migrated returns codes.Unimplemented. Migrated methods (today: + // Meta) override the unimplemented stubs. + authorizerv1.RegisterAuthorizerServer(srv, &handlers.AuthorizerHandler{Service: deps.ServiceProvider}) // gRPC health checking protocol (used by k8s grpc-probe and similar). hs := health.NewServer() diff --git a/internal/integration_tests/grpc_meta_test.go b/internal/integration_tests/grpc_meta_test.go index 15dc844f..787c8cc5 100644 --- a/internal/integration_tests/grpc_meta_test.go +++ b/internal/integration_tests/grpc_meta_test.go @@ -14,12 +14,12 @@ import ( "github.com/authorizerdev/authorizer/internal/grpcsrv" "github.com/authorizerdev/authorizer/internal/service" - metav1 "github.com/authorizerdev/authorizer/gen/go/authorizer/meta/v1" + authorizerv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/v1" ) -// TestGRPCMeta exercises MetaService.GetMeta end-to-end over a bufconn -// in-process gRPC channel. Validates the Phase 2 vertical slice: proto → -// handler → service.Meta → response projection. +// TestGRPCMeta exercises Authorizer.Meta end-to-end over a bufconn +// in-process gRPC channel. Validates the consolidated single-service +// design: proto → handler → service.Meta → response projection. func TestGRPCMeta(t *testing.T) { cfg := getTestConfig() cfg.ClientID = "test-client" @@ -49,9 +49,10 @@ func TestGRPCMeta(t *testing.T) { require.NoError(t, err) t.Cleanup(func() { _ = conn.Close() }) - client := metav1.NewMetaServiceClient(conn) - resp, err := client.GetMeta(context.Background(), &metav1.GetMetaRequest{}) + client := authorizerv1.NewAuthorizerClient(conn) + resp, err := client.Meta(context.Background(), &authorizerv1.MetaRequest{}) require.NoError(t, err) - require.Equal(t, "test-client", resp.ClientId) - require.NotEmpty(t, resp.Version) + require.NotNil(t, resp.Meta) + require.Equal(t, "test-client", resp.Meta.ClientId) + require.NotEmpty(t, resp.Meta.Version) } diff --git a/internal/integration_tests/grpc_surface_test.go b/internal/integration_tests/grpc_surface_test.go index 9dd34099..4e46eeec 100644 --- a/internal/integration_tests/grpc_surface_test.go +++ b/internal/integration_tests/grpc_surface_test.go @@ -18,11 +18,7 @@ import ( "github.com/authorizerdev/authorizer/internal/grpcsrv" "github.com/authorizerdev/authorizer/internal/service" - authzv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/authz/v1" - sessionv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/session/v1" - tokenv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/token/v1" - userv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/user/v1" - verificationv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/verification/v1" + authorizerv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/v1" ) // bootGRPCBufconn builds a gRPC server identical to the production one, @@ -54,95 +50,89 @@ func bootGRPCBufconn(t *testing.T) *grpc.ClientConn { return conn } -// TestGRPCStubsReturnUnimplemented locks down the Phase 2 contract: every -// service is registered (so reflection sees it) but the non-migrated ones -// return codes.Unimplemented until their handlers replace the stubs in -// follow-up PRs. A regression — e.g. accidentally returning OK or panicking -// — would silently change client behaviour. -func TestGRPCStubsReturnUnimplemented(t *testing.T) { +// TestAuthorizerStubsReturnUnimplemented locks down the contract for every +// not-yet-migrated method on the consolidated Authorizer service. Today +// Meta is the only real implementation; the remaining 18 methods return +// codes.Unimplemented. As each one gets migrated out of internal/graphql +// into internal/service, the corresponding sub-test here will start +// returning OK and the case can be moved to a happy-path test. +func TestAuthorizerStubsReturnUnimplemented(t *testing.T) { conn := bootGRPCBufconn(t) ctx := context.Background() + c := authorizerv1.NewAuthorizerClient(conn) type call func(context.Context) error cases := map[string]call{ - "UserService.CreateUser": func(c context.Context) error { - _, err := userv1.NewUserServiceClient(conn).CreateUser(c, &userv1.CreateUserRequest{ - Email: "x@example.com", Password: "p", ConfirmPassword: "p", - }) + "Signup": func(c0 context.Context) error { + _, err := c.Signup(c0, &authorizerv1.SignupRequest{Password: "p", ConfirmPassword: "p"}) return err }, - "UserService.GetUser": func(c context.Context) error { - _, err := userv1.NewUserServiceClient(conn).GetUser(c, &userv1.GetUserRequest{Name: "users/me"}) + "Login": func(c0 context.Context) error { + _, err := c.Login(c0, &authorizerv1.LoginRequest{Password: "p"}) return err }, - "UserService.UpdateUser": func(c context.Context) error { - _, err := userv1.NewUserServiceClient(conn).UpdateUser(c, &userv1.UpdateUserRequest{User: &userv1.User{Id: "users/me"}}) + "Logout": func(c0 context.Context) error { + _, err := c.Logout(c0, &authorizerv1.LogoutRequest{}) return err }, - "UserService.DeleteUser": func(c context.Context) error { - _, err := userv1.NewUserServiceClient(conn).DeleteUser(c, &userv1.DeleteUserRequest{Name: "users/me"}) + "MagicLinkLogin": func(c0 context.Context) error { + _, err := c.MagicLinkLogin(c0, &authorizerv1.MagicLinkLoginRequest{Email: "x@example.com"}) return err }, - "SessionService.CreateSession": func(c context.Context) error { - _, err := sessionv1.NewSessionServiceClient(conn).CreateSession(c, &sessionv1.CreateSessionRequest{ - Grant: &sessionv1.CreateSessionRequest_Password{ - Password: &sessionv1.PasswordGrant{Email: "x@example.com", Password: "p"}, - }, - }) + "VerifyEmail": func(c0 context.Context) error { + _, err := c.VerifyEmail(c0, &authorizerv1.VerifyEmailRequest{Token: "t"}) return err }, - "SessionService.GetCurrentSession": func(c context.Context) error { - _, err := sessionv1.NewSessionServiceClient(conn).GetCurrentSession(c, &sessionv1.GetCurrentSessionRequest{}) + "ResendVerifyEmail": func(c0 context.Context) error { + _, err := c.ResendVerifyEmail(c0, &authorizerv1.ResendVerifyEmailRequest{Email: "x@example.com", Identifier: "id"}) return err }, - "SessionService.DeleteSession": func(c context.Context) error { - _, err := sessionv1.NewSessionServiceClient(conn).DeleteSession(c, &sessionv1.DeleteSessionRequest{}) + "VerifyOtp": func(c0 context.Context) error { + _, err := c.VerifyOtp(c0, &authorizerv1.VerifyOtpRequest{Email: "x@example.com", Otp: "1"}) return err }, - "SessionService.CreateSessionValidation": func(c context.Context) error { - _, err := sessionv1.NewSessionServiceClient(conn).CreateSessionValidation(c, &sessionv1.CreateSessionValidationRequest{Cookie: "x"}) + "ResendOtp": func(c0 context.Context) error { + _, err := c.ResendOtp(c0, &authorizerv1.ResendOtpRequest{Email: "x@example.com"}) return err }, - "MagicLinkService.CreateMagicLink": func(c context.Context) error { - _, err := sessionv1.NewMagicLinkServiceClient(conn).CreateMagicLink(c, &sessionv1.CreateMagicLinkRequest{Email: "x@example.com"}) + "ForgotPassword": func(c0 context.Context) error { + _, err := c.ForgotPassword(c0, &authorizerv1.ForgotPasswordRequest{Email: "x@example.com"}) return err }, - "EmailVerification.Create": func(c context.Context) error { - _, err := verificationv1.NewEmailVerificationServiceClient(conn).CreateEmailVerification(c, &verificationv1.CreateEmailVerificationRequest{ - Email: "x@example.com", Identifier: "id", - }) + "ResetPassword": func(c0 context.Context) error { + _, err := c.ResetPassword(c0, &authorizerv1.ResetPasswordRequest{Token: "t", Password: "p", ConfirmPassword: "p"}) return err }, - "EmailVerification.Confirm": func(c context.Context) error { - _, err := verificationv1.NewEmailVerificationServiceClient(conn).ConfirmEmailVerification(c, &verificationv1.ConfirmEmailVerificationRequest{Token: "t"}) + "Profile": func(c0 context.Context) error { + _, err := c.Profile(c0, &authorizerv1.ProfileRequest{}) return err }, - "PasswordReset.Create": func(c context.Context) error { - _, err := verificationv1.NewPasswordResetServiceClient(conn).CreatePasswordReset(c, &verificationv1.CreatePasswordResetRequest{Email: "x@example.com"}) + "UpdateProfile": func(c0 context.Context) error { + _, err := c.UpdateProfile(c0, &authorizerv1.UpdateProfileRequest{}) return err }, - "PasswordReset.Confirm": func(c context.Context) error { - _, err := verificationv1.NewPasswordResetServiceClient(conn).ConfirmPasswordReset(c, &verificationv1.ConfirmPasswordResetRequest{Token: "t", Password: "p", ConfirmPassword: "p"}) + "DeactivateAccount": func(c0 context.Context) error { + _, err := c.DeactivateAccount(c0, &authorizerv1.DeactivateAccountRequest{}) return err }, - "OtpChallenge.Create": func(c context.Context) error { - _, err := verificationv1.NewOtpChallengeServiceClient(conn).CreateOtpChallenge(c, &verificationv1.CreateOtpChallengeRequest{Email: "x@example.com"}) + "Revoke": func(c0 context.Context) error { + _, err := c.Revoke(c0, &authorizerv1.RevokeRequest{RefreshToken: "t"}) return err }, - "OtpChallenge.Confirm": func(c context.Context) error { - _, err := verificationv1.NewOtpChallengeServiceClient(conn).ConfirmOtpChallenge(c, &verificationv1.ConfirmOtpChallengeRequest{ChallengeId: "id", Otp: "1"}) + "Session": func(c0 context.Context) error { + _, err := c.Session(c0, &authorizerv1.SessionRequest{}) return err }, - "TokenService.CreateTokenValidation": func(c context.Context) error { - _, err := tokenv1.NewTokenServiceClient(conn).CreateTokenValidation(c, &tokenv1.CreateTokenValidationRequest{TokenType: "access_token", Token: "t"}) + "ValidateJwtToken": func(c0 context.Context) error { + _, err := c.ValidateJwtToken(c0, &authorizerv1.ValidateJwtTokenRequest{TokenType: "access_token", Token: "t"}) return err }, - "TokenService.RevokeRefreshToken": func(c context.Context) error { - _, err := tokenv1.NewTokenServiceClient(conn).RevokeRefreshToken(c, &tokenv1.RevokeRefreshTokenRequest{RefreshToken: "t"}) + "ValidateSession": func(c0 context.Context) error { + _, err := c.ValidateSession(c0, &authorizerv1.ValidateSessionRequest{Cookie: "c"}) return err }, - "AuthzService.ListMyPermissions": func(c context.Context) error { - _, err := authzv1.NewAuthzServiceClient(conn).ListMyPermissions(c, &authzv1.ListMyPermissionsRequest{}) + "Permissions": func(c0 context.Context) error { + _, err := c.Permissions(c0, &authorizerv1.PermissionsRequest{}) return err }, } @@ -154,7 +144,7 @@ func TestGRPCStubsReturnUnimplemented(t *testing.T) { st, ok := status.FromError(err) require.True(t, ok) assert.Equal(t, codes.Unimplemented, st.Code(), - "stub for %s should return Unimplemented until its handler is wired", name) + "stub for Authorizer.%s should return Unimplemented until its handler is wired", name) }) } } diff --git a/internal/integration_tests/mcp_stubs_test.go b/internal/integration_tests/mcp_stubs_test.go index c6282250..233322c0 100644 --- a/internal/integration_tests/mcp_stubs_test.go +++ b/internal/integration_tests/mcp_stubs_test.go @@ -44,14 +44,13 @@ func TestMCPStubReturnsError(t *testing.T) { require.NoError(t, err) defer clientSession.Close() - // list_my_permissions is exposed via the proto annotation but its - // AuthzService.ListMyPermissions handler is a stub returning - // codes.Unimplemented. The MCP server must surface this as a - // CallToolResult{IsError:true} (tool-level error) rather than a - // JSON-RPC protocol error — so the LLM gets actionable text and can - // react / try a different tool. + // permissions is exposed via the proto annotation but its + // Authorizer.Permissions handler is a stub returning codes.Unimplemented. + // The MCP server must surface this as a CallToolResult{IsError:true} + // (tool-level error) rather than a JSON-RPC protocol error — so the + // LLM gets actionable text and can react / try a different tool. res, err := clientSession.CallTool(ctx, &mcp.CallToolParams{ - Name: "list_my_permissions", + Name: "permissions", Arguments: map[string]any{}, }) require.NoError(t, err, "tool execution errors must NOT surface as protocol errors") diff --git a/internal/integration_tests/mcp_test.go b/internal/integration_tests/mcp_test.go index ca67df90..7d17e098 100644 --- a/internal/integration_tests/mcp_test.go +++ b/internal/integration_tests/mcp_test.go @@ -14,11 +14,11 @@ import ( "github.com/authorizerdev/authorizer/internal/service" ) -// TestMCPListAndCallGetMeta exercises the Phase 4 vertical slice end-to-end: -// boot a gRPC server, wrap it in the MCP server (which auto-discovers tools -// from proto annotations), connect a client via in-memory transports, then -// list_tools + call get_meta. -func TestMCPListAndCallGetMeta(t *testing.T) { +// TestMCPListAndCallMeta exercises the vertical slice end-to-end on the +// consolidated single-service design: boot a gRPC server, wrap it in the +// MCP server (which auto-discovers tools from proto annotations), connect a +// client via in-memory transports, then list_tools + call meta. +func TestMCPListAndCallMeta(t *testing.T) { cfg := getTestConfig() cfg.ClientID = "test-client" @@ -50,22 +50,22 @@ func TestMCPListAndCallGetMeta(t *testing.T) { require.NoError(t, err) defer clientSession.Close() - // tools/list — should include get_meta (the only proto-annotated MCP tool today). + // tools/list — should include the four proto-annotated MCP tools: + // meta, profile, session, permissions. list, err := clientSession.ListTools(ctx, nil) require.NoError(t, err) - require.NotEmpty(t, list.Tools, "expected at least one MCP-exposed tool") - var found bool + gotNames := map[string]bool{} for _, tool := range list.Tools { - if tool.Name == "get_meta" { - found = true - break - } + gotNames[tool.Name] = true + } + for _, want := range []string{"meta", "profile", "session", "permissions"} { + require.True(t, gotNames[want], "expected MCP tool %q to be exposed; got %v", want, gotNames) } - require.True(t, found, "expected get_meta tool to be exposed") - // tools/call get_meta — should invoke MetaService.GetMeta and return JSON. + // tools/call meta — should invoke Authorizer.Meta and return JSON wrapped + // in the per-RPC MetaResponse shape. call, err := clientSession.CallTool(ctx, &mcp.CallToolParams{ - Name: "get_meta", + Name: "meta", Arguments: map[string]any{}, }) require.NoError(t, err) @@ -74,10 +74,12 @@ func TestMCPListAndCallGetMeta(t *testing.T) { body, err := json.Marshal(call.StructuredContent) require.NoError(t, err) var got struct { - ClientID string `json:"client_id"` - Version string `json:"version"` + Meta struct { + ClientID string `json:"client_id"` + Version string `json:"version"` + } `json:"meta"` } require.NoError(t, json.Unmarshal(body, &got)) - require.Equal(t, "test-client", got.ClientID) - require.NotEmpty(t, got.Version) + require.Equal(t, "test-client", got.Meta.ClientID) + require.NotEmpty(t, got.Meta.Version) } diff --git a/internal/integration_tests/rest_meta_test.go b/internal/integration_tests/rest_meta_test.go index f93688d5..6c6ba1d4 100644 --- a/internal/integration_tests/rest_meta_test.go +++ b/internal/integration_tests/rest_meta_test.go @@ -19,7 +19,10 @@ import ( // TestRESTMeta exercises GET /v1/meta through the grpc-gateway. Validates // that the gateway translates the REST call into an in-process gRPC -// invocation against MetaService.GetMeta, then renders the response as JSON. +// invocation against Authorizer.Meta, then renders the response as JSON. +// The wrapped response shape (`{"meta": {...}}`) is intentional: every +// Authorizer RPC's response is a thin wrapper around the inner type so +// buf STANDARD's RPC_REQUEST_RESPONSE_UNIQUE lint is satisfied. func TestRESTMeta(t *testing.T) { cfg := getTestConfig() cfg.ClientID = "test-client" @@ -57,10 +60,12 @@ func TestRESTMeta(t *testing.T) { require.NoError(t, err) var got struct { - ClientID string `json:"client_id"` - Version string `json:"version"` + Meta struct { + ClientID string `json:"client_id"` + Version string `json:"version"` + } `json:"meta"` } require.NoError(t, json.Unmarshal(body, &got)) - require.Equal(t, "test-client", got.ClientID) - require.NotEmpty(t, got.Version) + require.Equal(t, "test-client", got.Meta.ClientID) + require.NotEmpty(t, got.Meta.Version) } diff --git a/internal/mcp/schema_test.go b/internal/mcp/schema_test.go index 4571713a..5dc72f00 100644 --- a/internal/mcp/schema_test.go +++ b/internal/mcp/schema_test.go @@ -7,16 +7,14 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/reflect/protoreflect" - metav1 "github.com/authorizerdev/authorizer/gen/go/authorizer/meta/v1" - sessionv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/session/v1" - userv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/user/v1" + authorizerv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/v1" ) // TestSchemaForMessage_FlatScalars covers the most common case: a request -// message with only scalar fields. CreateUserRequest is a good representative -// — string / repeated string / bool / message-typed (AppData). +// message with only scalar fields. SignupRequest is a good representative — +// string / repeated string / bool / message-typed (AppData). func TestSchemaForMessage_FlatScalars(t *testing.T) { - md := (&userv1.CreateUserRequest{}).ProtoReflect().Descriptor() + md := (&authorizerv1.SignupRequest{}).ProtoReflect().Descriptor() s := schemaForMessage(md) assert.Equal(t, "object", s.Type) @@ -37,41 +35,23 @@ func TestSchemaForMessage_FlatScalars(t *testing.T) { assert.Equal(t, "object", app.Type) } -// TestSchemaForMessage_EmptyRequest — the GetMetaRequest type has no fields. +// TestSchemaForMessage_EmptyRequest — MetaRequest has no fields. func TestSchemaForMessage_EmptyRequest(t *testing.T) { - md := (&metav1.GetMetaRequest{}).ProtoReflect().Descriptor() + md := (&authorizerv1.MetaRequest{}).ProtoReflect().Descriptor() s := schemaForMessage(md) assert.Equal(t, "object", s.Type) assert.Empty(t, s.Properties) } -// TestSchemaForMessage_OneOfFieldsSurfaceIndividually documents current -// behaviour: oneof fields render as separately-optional properties rather -// than as a JSON-Schema oneOf constraint. This is a known limitation that -// MCP hosts will treat as "any one of these may be set"; documenting it -// here so future contributors know to add real oneOf support intentionally -// rather than accidentally inheriting today's shape. -func TestSchemaForMessage_OneOfFieldsSurfaceIndividually(t *testing.T) { - md := (&sessionv1.CreateSessionRequest{}).ProtoReflect().Descriptor() - s := schemaForMessage(md) - // Each grant arm is a separate property in the current schema. - assert.Contains(t, s.Properties, "password") - assert.Contains(t, s.Properties, "otp") - assert.Contains(t, s.Properties, "magic_link") - assert.Contains(t, s.Properties, "refresh_token") - // roles + scope + state still surface. - assert.Contains(t, s.Properties, "roles") -} - // TestSchemaForMessage_CycleSafe — google.protobuf.Value references itself // via repeated Value (ListValue.values). Before the cycle-guard fix, exposing // any tool whose request includes a Struct or Value field would stack-overflow // at boot. The visited-set short-circuits and emits an opaque `object`. func TestSchemaForMessage_CycleSafe(t *testing.T) { - // commonv1.AppData wraps google.protobuf.Struct, which contains a + // AppData wraps google.protobuf.Struct, which contains a // map, where Value can hold a ListValue of more Values. - // That's the exact recursion the reviewer flagged as a boot-time crash. - app := (&userv1.CreateUserRequest{}).ProtoReflect().Descriptor().Fields().ByName("app_data") + // That's the exact recursion that would stack-overflow without the guard. + app := (&authorizerv1.SignupRequest{}).ProtoReflect().Descriptor().Fields().ByName("app_data") require.NotNil(t, app) schema := schemaForField(app, map[protoreflect.FullName]struct{}{}) @@ -80,18 +60,13 @@ func TestSchemaForMessage_CycleSafe(t *testing.T) { assert.Equal(t, "object", schema.Type) } -// TestSchemaForKind_IntegerFamily walks all int-typed proto kinds and makes -// sure every one maps to JSON Schema "integer" (rather than "number" or -// "string"), since MCP hosts validate against this. -func TestSchemaForKind_IntegerFamily(t *testing.T) { - // Use any message with int64 fields; pagination/v1 carries a few. - type sample struct { - field string - want string - } - - md := (&userv1.GetUserRequest{}).ProtoReflect().Descriptor() +// TestSchemaForMessage_ScalarOnly walks a request that's purely scalars +// (no nested message). Profile takes no arguments at all; Session takes +// a few list-of-string + nested PermissionInput. +func TestSchemaForMessage_AllScalarKinds(t *testing.T) { + md := (&authorizerv1.ValidateJwtTokenRequest{}).ProtoReflect().Descriptor() s := schemaForMessage(md) - // `name` is a string field; sanity-check it. - assert.Equal(t, "string", s.Properties["name"].Type) + assert.Equal(t, "string", s.Properties["token_type"].Type) + assert.Equal(t, "string", s.Properties["token"].Type) + assert.Equal(t, "array", s.Properties["roles"].Type) } diff --git a/proto/authorizer/authz/v1/authz_service.proto b/proto/authorizer/authz/v1/authz_service.proto deleted file mode 100644 index ba476c10..00000000 --- a/proto/authorizer/authz/v1/authz_service.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package authorizer.authz.v1; - -import "google/api/annotations.proto"; -import "authorizer/common/v1/annotations.proto"; - -// AuthzService is the user-facing fine-grained-authorization surface. The -// admin CRUD on resources/scopes/policies/permissions remains GraphQL-only -// (dashboard consumer). -service AuthzService { - // ListMyPermissions returns every (resource, scope) pair the caller is - // allowed to act on, derived from their roles and the policy engine. - rpc ListMyPermissions(ListMyPermissionsRequest) returns (ListMyPermissionsResponse) { - option (google.api.http) = {get: "/v1/users/me/permissions"}; - option (authorizer.common.v1.mcp_tool) = {exposed: true}; - } -} - -message ListMyPermissionsRequest {} - -message ListMyPermissionsResponse { - repeated Permission permissions = 1; -} - -message Permission { - string resource = 1; - string scope = 2; -} diff --git a/proto/authorizer/meta/v1/meta_service.proto b/proto/authorizer/meta/v1/meta_service.proto deleted file mode 100644 index 597e929a..00000000 --- a/proto/authorizer/meta/v1/meta_service.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package authorizer.meta.v1; - -import "google/api/annotations.proto"; -import "authorizer/common/v1/annotations.proto"; - -// MetaService exposes server-discovery information. All methods are public. -service MetaService { - // GetMeta returns the server's feature-flag and provider configuration. - // Used by SPAs to decide which login UIs to render. - rpc GetMeta(GetMetaRequest) returns (GetMetaResponse) { - option (google.api.http) = {get: "/v1/meta"}; - option (authorizer.common.v1.public) = true; - option (authorizer.common.v1.mcp_tool) = {exposed: true}; - } -} - -message GetMetaRequest {} - -// GetMetaResponse mirrors the GraphQL Meta type 1:1. Field naming uses the -// existing snake_case names so existing consumers see the same shape over -// REST. -message GetMetaResponse { - string version = 1; - string client_id = 2; - bool is_google_login_enabled = 3; - bool is_facebook_login_enabled = 4; - bool is_github_login_enabled = 5; - bool is_linkedin_login_enabled = 6; - bool is_apple_login_enabled = 7; - bool is_discord_login_enabled = 8; - bool is_twitter_login_enabled = 9; - bool is_microsoft_login_enabled = 10; - bool is_twitch_login_enabled = 11; - bool is_roblox_login_enabled = 12; - bool is_email_verification_enabled = 13; - bool is_basic_authentication_enabled = 14; - bool is_magic_link_login_enabled = 15; - bool is_sign_up_enabled = 16; - bool is_strong_password_enabled = 17; - bool is_multi_factor_auth_enabled = 18; - bool is_mobile_basic_authentication_enabled = 19; - bool is_phone_verification_enabled = 20; -} diff --git a/proto/authorizer/session/v1/magic_link_service.proto b/proto/authorizer/session/v1/magic_link_service.proto deleted file mode 100644 index 807649a9..00000000 --- a/proto/authorizer/session/v1/magic_link_service.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package authorizer.session.v1; - -import "buf/validate/validate.proto"; -import "google/api/annotations.proto"; -import "authorizer/common/v1/annotations.proto"; - -// MagicLinkService models passwordless email-link login as the "magic link" -// resource. CreateMagicLink dispatches an email; the user clicks the link -// (handled by the existing /verify_email browser route), which results in a -// new Session via CreateSession with grant.magic_link. -service MagicLinkService { - // CreateMagicLink dispatches a magic-link email. Returns 202: the email - // is sent asynchronously; the link itself drives session creation later. - rpc CreateMagicLink(CreateMagicLinkRequest) returns (CreateMagicLinkResponse) { - option (google.api.http) = { - post: "/v1/magic-links" - body: "*" - }; - option (authorizer.common.v1.public) = true; - option (authorizer.common.v1.audit_log) = true; - } -} - -message CreateMagicLinkRequest { - string email = 1 [(buf.validate.field).string = {email: true, max_len: 320}]; - repeated string roles = 2; - repeated string scope = 3; - string state = 4; - string redirect_uri = 5; -} - -message CreateMagicLinkResponse { - string message = 1; -} diff --git a/proto/authorizer/session/v1/session.proto b/proto/authorizer/session/v1/session.proto deleted file mode 100644 index d7e216fa..00000000 --- a/proto/authorizer/session/v1/session.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package authorizer.session.v1; - -import "authorizer/user/v1/user.proto"; - -// Session is what CreateSession returns: tokens plus enough user context to -// avoid a follow-up GetUser. Mirrors the GraphQL AuthResponse type 1:1 in -// field naming. -message Session { - string message = 1; - bool should_show_email_otp_screen = 2; - bool should_show_mobile_otp_screen = 3; - bool should_show_totp_screen = 4; - string access_token = 5; - string id_token = 6; - string refresh_token = 7; - int64 expires_in = 8; - authorizer.user.v1.User user = 9; - // TOTP enrolment artifacts (set only when CreateSession initiates TOTP setup). - string authenticator_scanner_image = 10; - string authenticator_secret = 11; - repeated string authenticator_recovery_codes = 12; -} - -// SessionValidationResult is what CreateSessionValidation returns. -message SessionValidationResult { - bool is_valid = 1; - authorizer.user.v1.User user = 2; -} diff --git a/proto/authorizer/session/v1/session_service.proto b/proto/authorizer/session/v1/session_service.proto deleted file mode 100644 index 330f0b04..00000000 --- a/proto/authorizer/session/v1/session_service.proto +++ /dev/null @@ -1,127 +0,0 @@ -syntax = "proto3"; - -package authorizer.session.v1; - -import "buf/validate/validate.proto"; -import "google/api/annotations.proto"; -import "authorizer/common/v1/annotations.proto"; -import "authorizer/session/v1/session.proto"; - -// SessionService manages user sessions. Creating a session is "login"; -// deleting it is "logout"; reading the current session answers "am I -// authenticated, and as whom?". -service SessionService { - // CreateSession authenticates a user and returns a new Session. The - // request carries exactly one credential type via `oneof grant`. Browser - // callers (REST) additionally receive Set-Cookie headers. The OAuth2 - // token endpoint at POST /oauth/token remains the spec-compliant - // alternative for OAuth clients. - rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse) { - option (google.api.http) = { - post: "/v1/sessions" - body: "*" - }; - option (authorizer.common.v1.public) = true; - option (authorizer.common.v1.audit_log) = true; - option (authorizer.common.v1.mcp_tool) = {exposed: false}; // creds - } - - // GetCurrentSession returns the session bound to the caller's cookie or - // bearer token. Returns NOT_FOUND when unauthenticated. - rpc GetCurrentSession(GetCurrentSessionRequest) returns (GetCurrentSessionResponse) { - option (google.api.http) = {get: "/v1/sessions/me"}; - option (authorizer.common.v1.mcp_tool) = {exposed: true}; - } - - // DeleteSession ends the caller's current session. Always returns empty - // on success, even if no session was active (idempotent). - rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse) { - option (google.api.http) = {delete: "/v1/sessions/me"}; - option (authorizer.common.v1.audit_log) = true; - } - - // CreateSessionValidation validates a cookie/token held by a third party - // — the typed equivalent of "is this session real?" used by backend - // services validating tokens forwarded by an upstream proxy. - rpc CreateSessionValidation(CreateSessionValidationRequest) returns (CreateSessionValidationResponse) { - option (google.api.http) = { - post: "/v1/sessions/validations" - body: "*" - }; - option (authorizer.common.v1.public) = true; - } -} - -message CreateSessionRequest { - oneof grant { - PasswordGrant password = 1; - OtpGrant otp = 2; - MagicLinkGrant magic_link = 3; - RefreshTokenGrant refresh_token = 4; - } - repeated string roles = 10; - repeated string scope = 11; - // OAuth2 authorization-code flow state echoed back via c_hash. - string state = 12; -} - -message PasswordGrant { - // Exactly one of email / phone_number is required. - string email = 1 [(buf.validate.field).string.max_len = 320]; - string phone_number = 2 [(buf.validate.field).string.max_len = 32]; - string password = 3 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; -} - -message OtpGrant { - string email = 1 [(buf.validate.field).string.max_len = 320]; - string phone_number = 2 [(buf.validate.field).string.max_len = 32]; - string otp = 3 [(buf.validate.field).string = {min_len: 1, max_len: 16}]; - bool is_totp = 4; -} - -message MagicLinkGrant { - // The token from the magic-link email URL. - string token = 1 [(buf.validate.field).string.min_len = 1]; -} - -message RefreshTokenGrant { - string refresh_token = 1 [(buf.validate.field).string.min_len = 1]; -} - -message GetCurrentSessionRequest { - // Optional permission filter: deny the request unless the caller holds - // every (resource, scope) pair listed. Matches GraphQL - // SessionQueryRequest.required_permissions. - repeated PermissionRef required_permissions = 1; - repeated string roles = 2; - repeated string scope = 3; - string state = 4; -} - -message PermissionRef { - string resource = 1 [(buf.validate.field).string.min_len = 1]; - string scope = 2 [(buf.validate.field).string.min_len = 1]; -} - -message CreateSessionResponse { - Session session = 1; -} - -message GetCurrentSessionResponse { - Session session = 1; -} - -message DeleteSessionRequest {} - -message DeleteSessionResponse {} - -message CreateSessionValidationRequest { - // Cookie value (typically the fingerprint hash) to validate. - string cookie = 1 [(buf.validate.field).string.min_len = 1]; - repeated string roles = 2; - repeated PermissionRef required_permissions = 3; -} - -message CreateSessionValidationResponse { - SessionValidationResult result = 1; -} diff --git a/proto/authorizer/token/v1/token_service.proto b/proto/authorizer/token/v1/token_service.proto deleted file mode 100644 index 1a26643a..00000000 --- a/proto/authorizer/token/v1/token_service.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; - -package authorizer.token.v1; - -import "buf/validate/validate.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; -import "authorizer/common/v1/annotations.proto"; - -// TokenService operates on existing tokens — distinct from SessionService -// (which *issues* tokens via login). RFC 7009 token revocation and RFC 7662 -// introspection remain at their standards-mandated /oauth/* HTTP paths for -// OAuth-spec compatibility; this service offers typed mirrors for -// first-party SDK use. -service TokenService { - // CreateTokenValidation validates a JWT and returns its claims. Equivalent - // to GraphQL validate_jwt_token. - rpc CreateTokenValidation(CreateTokenValidationRequest) returns (CreateTokenValidationResponse) { - option (google.api.http) = { - post: "/v1/token-validations" - body: "*" - }; - option (authorizer.common.v1.public) = true; - } - - // RevokeRefreshToken invalidates a refresh token. Typed mirror of - // RFC 7009 `POST /oauth/revoke`. - rpc RevokeRefreshToken(RevokeRefreshTokenRequest) returns (RevokeRefreshTokenResponse) { - option (google.api.http) = {delete: "/v1/refresh-tokens/{refresh_token}"}; - option (authorizer.common.v1.audit_log) = true; - } -} - -message CreateTokenValidationRequest { - // One of: "access_token", "id_token", "refresh_token". - string token_type = 1 [(buf.validate.field).string.min_len = 1]; - string token = 2 [(buf.validate.field).string.min_len = 1]; - repeated string roles = 3; - repeated PermissionRef required_permissions = 4; -} - -message PermissionRef { - string resource = 1 [(buf.validate.field).string.min_len = 1]; - string scope = 2 [(buf.validate.field).string.min_len = 1]; -} - -message CreateTokenValidationResponse { - bool is_valid = 1; - // Free-form JWT claims; matches GraphQL ValidateJWTTokenResponse.claims. - google.protobuf.Struct claims = 2; -} - -message RevokeRefreshTokenRequest { - string refresh_token = 1 [(buf.validate.field).string.min_len = 1]; -} - -message RevokeRefreshTokenResponse {} diff --git a/proto/authorizer/user/v1/user.proto b/proto/authorizer/user/v1/user.proto deleted file mode 100644 index 3970f259..00000000 --- a/proto/authorizer/user/v1/user.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package authorizer.user.v1; - -import "authorizer/common/v1/types.proto"; - -// User mirrors the GraphQL User type. Field names match the existing -// JSON/GraphQL surface so REST callers see the same shape. -// -// The canonical resource name is either "users/me" (the caller) or -// "users/{id}". Other RPCs accept this string form via the `name` field on -// their requests. -message User { - string id = 1; - // Either email or phone_number is always present. - string email = 2; - bool email_verified = 3; - string signup_methods = 4; - string given_name = 5; - string family_name = 6; - string middle_name = 7; - string nickname = 8; - // Defaults to email when unset. - string preferred_username = 9; - string gender = 10; - string birthdate = 11; - string phone_number = 12; - bool phone_number_verified = 13; - string picture = 14; - repeated string roles = 15; - int64 created_at = 16; - int64 updated_at = 17; - int64 revoked_timestamp = 18; - bool is_multi_factor_auth_enabled = 19; - // Free-form key/value bag — same as GraphQL `app_data: Map`. - authorizer.common.v1.AppData app_data = 20; -} diff --git a/proto/authorizer/user/v1/user_service.proto b/proto/authorizer/user/v1/user_service.proto deleted file mode 100644 index 04beb1cd..00000000 --- a/proto/authorizer/user/v1/user_service.proto +++ /dev/null @@ -1,125 +0,0 @@ -syntax = "proto3"; - -package authorizer.user.v1; - -import "buf/validate/validate.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/field_mask.proto"; -import "authorizer/common/v1/annotations.proto"; -import "authorizer/common/v1/types.proto"; -import "authorizer/user/v1/user.proto"; - -// UserService manages the User resource. Self vs admin is expressed via the -// resource-name pattern: "users/me" refers to the caller; "users/{id}" -// refers to any user (admin-only paths). On this v1 surface only "users/me" -// is exposed — admin operations live on GraphQL. -service UserService { - // CreateUser registers a new user account. Public — requires sign-up - // enabled in server config. On success returns tokens and (for browser - // callers) Set-Cookie headers. - rpc CreateUser(CreateUserRequest) returns (CreateUserResponse) { - option (google.api.http) = { - post: "/v1/users" - body: "*" - }; - option (authorizer.common.v1.public) = true; - option (authorizer.common.v1.audit_log) = true; - option (authorizer.common.v1.mcp_tool) = {exposed: false}; // creds - } - - // GetUser returns a single user. On this surface, only name="users/me" is - // accepted; admin reads remain on GraphQL. - rpc GetUser(GetUserRequest) returns (GetUserResponse) { - option (google.api.http) = {get: "/v1/users/me"}; - option (authorizer.common.v1.mcp_tool) = {exposed: true}; - } - - // UpdateUser patches a user. On this surface, only name="users/me" is - // accepted. The optional field_mask controls which fields are updated. - rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse) { - option (google.api.http) = { - patch: "/v1/users/me" - body: "user" - }; - option (authorizer.common.v1.audit_log) = true; - } - - // DeleteUser deactivates the caller's account (soft delete). All of the - // user's refresh tokens are revoked as a side effect. OAuth has no - // standard concept of account deactivation — this method is the typed - // equivalent of SCIM `PATCH /Users/{id} {active:false}`. - rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) { - option (google.api.http) = {delete: "/v1/users/me"}; - option (authorizer.common.v1.audit_log) = true; - option (authorizer.common.v1.mcp_tool) = { - exposed: false - destructive: true - }; - } -} - -message CreateUserRequest { - // Email or phone_number must be set (validated at the handler). - string email = 1 [(buf.validate.field).string = {email: true, max_len: 320}]; - string phone_number = 2 [(buf.validate.field).string.max_len = 32]; - string password = 3 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; - string confirm_password = 4 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; - string given_name = 5; - string family_name = 6; - string middle_name = 7; - string nickname = 8; - string gender = 9; - string birthdate = 10; - string picture = 11; - repeated string roles = 12; - repeated string scope = 13; - string redirect_uri = 14; - bool is_multi_factor_auth_enabled = 15; - // OAuth2 authorization-code flow state echoed back via c_hash. - string state = 16; - authorizer.common.v1.AppData app_data = 17; -} - -message CreateUserResponse { - // Human-readable message describing the outcome (e.g. "Verification email - // sent" vs "Signed up successfully"). - string message = 1; - bool should_show_email_otp_screen = 2; - bool should_show_mobile_otp_screen = 3; - bool should_show_totp_screen = 4; - string access_token = 5; - string id_token = 6; - string refresh_token = 7; - int64 expires_in = 8; - User user = 9; -} - -message GetUserRequest { - // Must be "users/me" on this v1 surface. - string name = 1 [(buf.validate.field).string.pattern = "^users/(me|[A-Za-z0-9_-]+)$"]; -} - -message GetUserResponse { - User user = 1; -} - -message UpdateUserRequest { - // The user to update. user.id should be "users/me" or omitted. - User user = 1 [(buf.validate.field).required = true]; - google.protobuf.FieldMask update_mask = 2; - // Optional credential change. Validated cross-field by the handler. - string old_password = 3; - string new_password = 4; - string confirm_new_password = 5; -} - -message UpdateUserResponse { - User user = 1; -} - -message DeleteUserRequest { - // Must be "users/me" on this v1 surface. - string name = 1 [(buf.validate.field).string.pattern = "^users/(me|[A-Za-z0-9_-]+)$"]; -} - -message DeleteUserResponse {} diff --git a/proto/authorizer/v1/authorizer.proto b/proto/authorizer/v1/authorizer.proto new file mode 100644 index 00000000..b9bebe24 --- /dev/null +++ b/proto/authorizer/v1/authorizer.proto @@ -0,0 +1,410 @@ +// Authorizer is the single gRPC service that exposes Authorizer's public +// API. Method names match the GraphQL operation names 1:1 (snake_case in +// GraphQL → PascalCase in proto): Signup, Login, MagicLinkLogin, VerifyEmail, +// ResendVerifyEmail, ForgotPassword, ResetPassword, VerifyOtp, ResendOtp, +// UpdateProfile, DeactivateAccount, Revoke, Meta, Session, Profile, +// ValidateJwtToken, ValidateSession, Permissions, Logout. +// +// Why one service: clients consume a single typed client per language, +// discovery is trivial, and the surface mirrors the GraphQL one users +// already know. The trade-off is that we lose resource-oriented evolution +// (no `List/Get/Create` symmetry per resource) — acceptable for an auth +// surface where most operations are stateless verbs anyway. +// +// REST mapping follows a simple rule: +// - GET /v1/{method} when the request body is empty (Meta, Profile, +// Permissions, Logout) +// - POST /v1/{method} otherwise +syntax = "proto3"; + +package authorizer.v1; + +import "buf/validate/validate.proto"; +import "google/api/annotations.proto"; +import "authorizer/common/v1/annotations.proto"; +import "authorizer/common/v1/types.proto"; +import "authorizer/v1/types.proto"; + +service Authorizer { + // === Identity creation & authentication === + + // Signup registers a new user. Public; requires sign-up enabled in config. + // Returns AuthResponse with tokens + (browser callers) Set-Cookie headers. + rpc Signup(SignupRequest) returns (SignupResponse) { + option (google.api.http) = { + post: "/v1/signup" + body: "*" + }; + option (authorizer.common.v1.public) = true; + option (authorizer.common.v1.audit_log) = true; + option (authorizer.common.v1.mcp_tool) = {exposed: false}; // creds + } + + // Login authenticates with email/phone + password. + rpc Login(LoginRequest) returns (LoginResponse) { + option (google.api.http) = { + post: "/v1/login" + body: "*" + }; + option (authorizer.common.v1.public) = true; + option (authorizer.common.v1.audit_log) = true; + option (authorizer.common.v1.mcp_tool) = {exposed: false}; // creds + } + + // Logout ends the caller's current session. + rpc Logout(LogoutRequest) returns (LogoutResponse) { + option (google.api.http) = {get: "/v1/logout"}; + option (authorizer.common.v1.audit_log) = true; + } + + // MagicLinkLogin dispatches a passwordless email link. The clicked link + // hits the existing /verify_email browser handler. + rpc MagicLinkLogin(MagicLinkLoginRequest) returns (MagicLinkLoginResponse) { + option (google.api.http) = { + post: "/v1/magic_link_login" + body: "*" + }; + option (authorizer.common.v1.public) = true; + option (authorizer.common.v1.audit_log) = true; + } + + // === Email + OTP verification === + + rpc VerifyEmail(VerifyEmailRequest) returns (VerifyEmailResponse) { + option (google.api.http) = { + post: "/v1/verify_email" + body: "*" + }; + option (authorizer.common.v1.public) = true; + option (authorizer.common.v1.audit_log) = true; + } + + rpc ResendVerifyEmail(ResendVerifyEmailRequest) returns (ResendVerifyEmailResponse) { + option (google.api.http) = { + post: "/v1/resend_verify_email" + body: "*" + }; + option (authorizer.common.v1.public) = true; + } + + rpc VerifyOtp(VerifyOtpRequest) returns (VerifyOtpResponse) { + option (google.api.http) = { + post: "/v1/verify_otp" + body: "*" + }; + option (authorizer.common.v1.public) = true; + option (authorizer.common.v1.audit_log) = true; + } + + rpc ResendOtp(ResendOtpRequest) returns (ResendOtpResponse) { + option (google.api.http) = { + post: "/v1/resend_otp" + body: "*" + }; + option (authorizer.common.v1.public) = true; + } + + // === Password lifecycle === + + rpc ForgotPassword(ForgotPasswordRequest) returns (ForgotPasswordResponse) { + option (google.api.http) = { + post: "/v1/forgot_password" + body: "*" + }; + option (authorizer.common.v1.public) = true; + } + + rpc ResetPassword(ResetPasswordRequest) returns (ResetPasswordResponse) { + option (google.api.http) = { + post: "/v1/reset_password" + body: "*" + }; + option (authorizer.common.v1.public) = true; + option (authorizer.common.v1.audit_log) = true; + } + + // === Profile + account === + + // Profile returns the authenticated user. + rpc Profile(ProfileRequest) returns (ProfileResponse) { + option (google.api.http) = {get: "/v1/profile"}; + option (authorizer.common.v1.mcp_tool) = {exposed: true}; + } + + rpc UpdateProfile(UpdateProfileRequest) returns (UpdateProfileResponse) { + option (google.api.http) = { + post: "/v1/update_profile" + body: "*" + }; + option (authorizer.common.v1.audit_log) = true; + } + + // DeactivateAccount soft-deletes the caller's account and revokes all + // refresh tokens as a side effect. OAuth has no concept of account + // deactivation; this is the typed equivalent of SCIM PATCH active=false. + rpc DeactivateAccount(DeactivateAccountRequest) returns (DeactivateAccountResponse) { + option (google.api.http) = { + post: "/v1/deactivate_account" + body: "*" + }; + option (authorizer.common.v1.audit_log) = true; + option (authorizer.common.v1.mcp_tool) = { + exposed: false + destructive: true + }; + } + + // === Token + session === + + // Revoke invalidates a refresh token. Typed mirror of RFC 7009. + rpc Revoke(RevokeRequest) returns (RevokeResponse) { + option (google.api.http) = { + post: "/v1/revoke" + body: "*" + }; + option (authorizer.common.v1.audit_log) = true; + } + + // Session returns the AuthResponse bound to the caller's cookie/bearer. + rpc Session(SessionRequest) returns (SessionResponse) { + option (google.api.http) = { + post: "/v1/session" + body: "*" + }; + option (authorizer.common.v1.mcp_tool) = {exposed: true}; + } + + rpc ValidateJwtToken(ValidateJwtTokenRequest) returns (ValidateJwtTokenResponse) { + option (google.api.http) = { + post: "/v1/validate_jwt_token" + body: "*" + }; + option (authorizer.common.v1.public) = true; + } + + rpc ValidateSession(ValidateSessionRequest) returns (ValidateSessionResponse) { + option (google.api.http) = { + post: "/v1/validate_session" + body: "*" + }; + option (authorizer.common.v1.public) = true; + } + + // === Server discovery + caller authz === + + // Meta returns server feature flags. No auth required. + rpc Meta(MetaRequest) returns (MetaResponse) { + option (google.api.http) = {get: "/v1/meta"}; + option (authorizer.common.v1.public) = true; + option (authorizer.common.v1.mcp_tool) = {exposed: true}; + } + + // Permissions returns the caller's effective (resource, scope) pairs. + rpc Permissions(PermissionsRequest) returns (PermissionsResponse) { + option (google.api.http) = {get: "/v1/permissions"}; + option (authorizer.common.v1.mcp_tool) = {exposed: true}; + } +} + +// ============================================================================ +// Per-RPC request + response messages. +// +// Buf STANDARD lint requires unique req/resp types per RPC. Many of our +// responses naturally share the same inner shape (AuthResponse, User, etc.), +// so the wrappers below are thin: one field, the typed inner payload. This +// gives forward evolution room (we can add fields per-RPC without disturbing +// the others) at the cost of one extra accessor level on the client side. +// ============================================================================ + +message SignupRequest { + string email = 1 [(buf.validate.field).string = {max_len: 320}]; + string phone_number = 2 [(buf.validate.field).string.max_len = 32]; + string password = 3 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; + string confirm_password = 4 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; + string given_name = 5; + string family_name = 6; + string middle_name = 7; + string nickname = 8; + string gender = 9; + string birthdate = 10; + string picture = 11; + repeated string roles = 12; + repeated string scope = 13; + string redirect_uri = 14; + bool is_multi_factor_auth_enabled = 15; + string state = 16; + authorizer.common.v1.AppData app_data = 17; +} +message SignupResponse { + AuthResponse auth = 1; +} + +message LoginRequest { + string email = 1 [(buf.validate.field).string.max_len = 320]; + string phone_number = 2 [(buf.validate.field).string.max_len = 32]; + string password = 3 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; + repeated string roles = 4; + repeated string scope = 5; + string state = 6; +} +message LoginResponse { + AuthResponse auth = 1; +} + +message LogoutRequest {} +message LogoutResponse { + string message = 1; +} + +message MagicLinkLoginRequest { + string email = 1 [(buf.validate.field).string = {max_len: 320}]; + repeated string roles = 2; + repeated string scope = 3; + string state = 4; + string redirect_uri = 5; +} +message MagicLinkLoginResponse { + string message = 1; +} + +message VerifyEmailRequest { + string token = 1 [(buf.validate.field).string.min_len = 1]; + string state = 2; +} +message VerifyEmailResponse { + AuthResponse auth = 1; +} + +message ResendVerifyEmailRequest { + string email = 1 [(buf.validate.field).string = {max_len: 320}]; + string identifier = 2 [(buf.validate.field).string.min_len = 1]; + string state = 3; +} +message ResendVerifyEmailResponse { + string message = 1; +} + +message VerifyOtpRequest { + // Exactly one of email / phone_number is required. + string email = 1 [(buf.validate.field).string.max_len = 320]; + string phone_number = 2 [(buf.validate.field).string.max_len = 32]; + string otp = 3 [(buf.validate.field).string = {min_len: 1, max_len: 16}]; + bool is_totp = 4; + string state = 5; +} +message VerifyOtpResponse { + AuthResponse auth = 1; +} + +message ResendOtpRequest { + string email = 1 [(buf.validate.field).string.max_len = 320]; + string phone_number = 2 [(buf.validate.field).string.max_len = 32]; + string state = 3; +} +message ResendOtpResponse { + string message = 1; +} + +message ForgotPasswordRequest { + string email = 1 [(buf.validate.field).string.max_len = 320]; + string phone_number = 2 [(buf.validate.field).string.max_len = 32]; + string state = 3; + string redirect_uri = 4; +} +message ForgotPasswordResponse { + string message = 1; + // For SMS-driven flows the UI may need to render an OTP entry screen. + bool should_show_mobile_otp_screen = 2; +} + +message ResetPasswordRequest { + // For email flows: the token from the reset email. For SMS flows: the OTP. + string token = 1; + string otp = 2; + string phone_number = 3 [(buf.validate.field).string.max_len = 32]; + string password = 4 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; + string confirm_password = 5 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; +} +message ResetPasswordResponse { + string message = 1; +} + +message ProfileRequest {} +message ProfileResponse { + User user = 1; +} + +message UpdateProfileRequest { + string old_password = 1; + string new_password = 2 [(buf.validate.field).string.max_len = 128]; + string confirm_new_password = 3 [(buf.validate.field).string.max_len = 128]; + string email = 4 [(buf.validate.field).string.max_len = 320]; + string given_name = 5; + string family_name = 6; + string middle_name = 7; + string nickname = 8; + string gender = 9; + string birthdate = 10; + string phone_number = 11 [(buf.validate.field).string.max_len = 32]; + string picture = 12; + bool is_multi_factor_auth_enabled = 13; + authorizer.common.v1.AppData app_data = 14; +} +message UpdateProfileResponse { + string message = 1; +} + +message DeactivateAccountRequest {} +message DeactivateAccountResponse { + string message = 1; +} + +message RevokeRequest { + string refresh_token = 1 [(buf.validate.field).string.min_len = 1]; +} +message RevokeResponse { + string message = 1; +} + +message SessionRequest { + repeated string roles = 1; + repeated string scope = 2; + string state = 3; + // Optional AND-combined permission filter; deny if any is missing. + repeated PermissionInput required_permissions = 4; +} +message SessionResponse { + AuthResponse auth = 1; +} + +message ValidateJwtTokenRequest { + string token_type = 1 [(buf.validate.field).string.min_len = 1]; + string token = 2 [(buf.validate.field).string.min_len = 1]; + repeated string roles = 3; + repeated PermissionInput required_permissions = 4; +} +message ValidateJwtTokenResponse { + bool is_valid = 1; + // Free-form JWT claims (matches GraphQL ValidateJWTTokenResponse.claims). + authorizer.common.v1.AppData claims = 2; +} + +message ValidateSessionRequest { + string cookie = 1 [(buf.validate.field).string.min_len = 1]; + repeated string roles = 2; + repeated PermissionInput required_permissions = 3; +} +message ValidateSessionResponse { + bool is_valid = 1; + User user = 2; +} + +message MetaRequest {} +message MetaResponse { + Meta meta = 1; +} + +message PermissionsRequest {} +message PermissionsResponse { + repeated Permission permissions = 1; +} diff --git a/proto/authorizer/v1/types.proto b/proto/authorizer/v1/types.proto new file mode 100644 index 00000000..99d465b4 --- /dev/null +++ b/proto/authorizer/v1/types.proto @@ -0,0 +1,93 @@ +// Shared message types used by the Authorizer service. Field naming mirrors +// the GraphQL schema 1:1 so REST/gRPC clients see the same shape. +syntax = "proto3"; + +package authorizer.v1; + +import "authorizer/common/v1/types.proto"; + +// User mirrors the GraphQL User type. Returned by Profile and embedded in +// AuthResponse. +message User { + string id = 1; + // Either email or phone_number is always present. + string email = 2; + bool email_verified = 3; + string signup_methods = 4; + string given_name = 5; + string family_name = 6; + string middle_name = 7; + string nickname = 8; + // Defaults to email when unset. + string preferred_username = 9; + string gender = 10; + string birthdate = 11; + string phone_number = 12; + bool phone_number_verified = 13; + string picture = 14; + repeated string roles = 15; + int64 created_at = 16; + int64 updated_at = 17; + int64 revoked_timestamp = 18; + bool is_multi_factor_auth_enabled = 19; + // Free-form key/value bag — same as GraphQL `app_data: Map`. + authorizer.common.v1.AppData app_data = 20; +} + +// AuthResponse mirrors the GraphQL AuthResponse type. Returned (wrapped) by +// every method that produces a session: Signup, Login, MagicLinkLogin, +// VerifyEmail, VerifyOtp, Session. +message AuthResponse { + string message = 1; + bool should_show_email_otp_screen = 2; + bool should_show_mobile_otp_screen = 3; + bool should_show_totp_screen = 4; + string access_token = 5; + string id_token = 6; + string refresh_token = 7; + int64 expires_in = 8; + User user = 9; + // TOTP enrolment artifacts (populated only when this AuthResponse + // initiates TOTP setup; one-time, never re-shown). + string authenticator_scanner_image = 10; + string authenticator_secret = 11; + repeated string authenticator_recovery_codes = 12; +} + +// Permission is one (resource, scope) pair the caller is allowed to act on. +message Permission { + string resource = 1; + string scope = 2; +} + +// PermissionInput is the request-side mirror of Permission used by +// methods that take a list of required permissions. +message PermissionInput { + string resource = 1; + string scope = 2; +} + +// Meta mirrors the GraphQL Meta type — server feature flags + provider +// availability, returned by the Meta query. +message Meta { + string version = 1; + string client_id = 2; + bool is_google_login_enabled = 3; + bool is_facebook_login_enabled = 4; + bool is_github_login_enabled = 5; + bool is_linkedin_login_enabled = 6; + bool is_apple_login_enabled = 7; + bool is_discord_login_enabled = 8; + bool is_twitter_login_enabled = 9; + bool is_microsoft_login_enabled = 10; + bool is_twitch_login_enabled = 11; + bool is_roblox_login_enabled = 12; + bool is_email_verification_enabled = 13; + bool is_basic_authentication_enabled = 14; + bool is_magic_link_login_enabled = 15; + bool is_sign_up_enabled = 16; + bool is_strong_password_enabled = 17; + bool is_multi_factor_auth_enabled = 18; + bool is_mobile_basic_authentication_enabled = 19; + bool is_phone_verification_enabled = 20; +} diff --git a/proto/authorizer/verification/v1/email_verification_service.proto b/proto/authorizer/verification/v1/email_verification_service.proto deleted file mode 100644 index 37a4d6a9..00000000 --- a/proto/authorizer/verification/v1/email_verification_service.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; - -package authorizer.verification.v1; - -import "buf/validate/validate.proto"; -import "google/api/annotations.proto"; -import "authorizer/common/v1/annotations.proto"; -import "authorizer/session/v1/session.proto"; - -// Note: this file imports authorizer.session.v1.Session only because -// successful email confirmation can issue a new session in self-sign-up -// flows. Future evolution may move the session-issuance side effect to a -// separate RPC to keep verification semantics clean. - -// EmailVerificationService models the email-verification challenge as a -// resource. Create dispatches (or re-dispatches) a verification email; -// Confirm completes the verification with the token from the email link. -service EmailVerificationService { - // CreateEmailVerification (re)sends the verification email for an - // unverified address. Returns 201; idempotent within a short window. - rpc CreateEmailVerification(CreateEmailVerificationRequest) returns (CreateEmailVerificationResponse) { - option (google.api.http) = { - post: "/v1/email-verifications" - body: "*" - }; - option (authorizer.common.v1.public) = true; - } - - // ConfirmEmailVerification marks the verification complete. Returns a - // Session when the original signup was a self-sign-up flow (so the user - // is logged in immediately); otherwise returns the empty Session. - rpc ConfirmEmailVerification(ConfirmEmailVerificationRequest) returns (ConfirmEmailVerificationResponse) { - option (google.api.http) = { - put: "/v1/email-verifications/{token}" - body: "*" - }; - option (authorizer.common.v1.public) = true; - option (authorizer.common.v1.audit_log) = true; - } -} - -message CreateEmailVerificationRequest { - string email = 1 [(buf.validate.field).string = {email: true, max_len: 320}]; - // Verification identifier (typeof verification, e.g. basic-auth-signup). - string identifier = 2 [(buf.validate.field).string.min_len = 1]; - string state = 3; -} - -message CreateEmailVerificationResponse { - string message = 1; -} - -message ConfirmEmailVerificationRequest { - string token = 1 [(buf.validate.field).string.min_len = 1]; - string state = 2; -} - -message ConfirmEmailVerificationResponse { - authorizer.session.v1.Session session = 1; -} diff --git a/proto/authorizer/verification/v1/otp_challenge_service.proto b/proto/authorizer/verification/v1/otp_challenge_service.proto deleted file mode 100644 index e008e5c7..00000000 --- a/proto/authorizer/verification/v1/otp_challenge_service.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; - -package authorizer.verification.v1; - -import "buf/validate/validate.proto"; -import "google/api/annotations.proto"; -import "authorizer/common/v1/annotations.proto"; -import "authorizer/session/v1/session.proto"; - -// OtpChallengeService models the OTP step (email or SMS or TOTP) as a -// challenge resource. Create requests a fresh OTP; Confirm verifies it and -// — if successful — issues a Session (since OTP is the second factor of an -// in-progress login). -service OtpChallengeService { - // CreateOtpChallenge (re)sends an OTP to the address tied to an - // in-progress login. Returns 201. - rpc CreateOtpChallenge(CreateOtpChallengeRequest) returns (CreateOtpChallengeResponse) { - option (google.api.http) = { - post: "/v1/otp-challenges" - body: "*" - }; - option (authorizer.common.v1.public) = true; - } - - // ConfirmOtpChallenge verifies the supplied OTP and, on success, returns - // a Session for the user. Browser callers also receive Set-Cookie. - rpc ConfirmOtpChallenge(ConfirmOtpChallengeRequest) returns (ConfirmOtpChallengeResponse) { - option (google.api.http) = { - put: "/v1/otp-challenges/{challenge_id}" - body: "*" - }; - option (authorizer.common.v1.public) = true; - option (authorizer.common.v1.audit_log) = true; - } -} - -message CreateOtpChallengeRequest { - // Exactly one of email / phone_number is required. - string email = 1 [(buf.validate.field).string.max_len = 320]; - string phone_number = 2 [(buf.validate.field).string.max_len = 32]; - string state = 3; -} - -message CreateOtpChallengeResponse { - string message = 1; -} - -message ConfirmOtpChallengeRequest { - // Opaque challenge id (today: the email / phone the OTP was sent to). - string challenge_id = 1 [(buf.validate.field).string.min_len = 1]; - // The OTP value the user entered. - string otp = 2 [(buf.validate.field).string = {min_len: 1, max_len: 16}]; - // Either email or phone_number identifies the user (mirrors challenge_id - // for now; reserved for a future opaque challenge-id design). - string email = 3 [(buf.validate.field).string.max_len = 320]; - string phone_number = 4 [(buf.validate.field).string.max_len = 32]; - bool is_totp = 5; - string state = 6; -} - -message ConfirmOtpChallengeResponse { - authorizer.session.v1.Session session = 1; -} diff --git a/proto/authorizer/verification/v1/password_reset_service.proto b/proto/authorizer/verification/v1/password_reset_service.proto deleted file mode 100644 index e95ab3fd..00000000 --- a/proto/authorizer/verification/v1/password_reset_service.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package authorizer.verification.v1; - -import "buf/validate/validate.proto"; -import "google/api/annotations.proto"; -import "authorizer/common/v1/annotations.proto"; - -// PasswordResetService models the forgot-password flow as a challenge -// resource: Create dispatches an email/SMS with a reset link; Confirm -// applies the new password using the link's token. -service PasswordResetService { - // CreatePasswordReset dispatches a reset notification. Returns 202. - // Always returns success even when the address is unknown (prevents - // account enumeration). - rpc CreatePasswordReset(CreatePasswordResetRequest) returns (CreatePasswordResetResponse) { - option (google.api.http) = { - post: "/v1/password-resets" - body: "*" - }; - option (authorizer.common.v1.public) = true; - } - - // ConfirmPasswordReset sets the user's new password using the token from - // the reset notification. - rpc ConfirmPasswordReset(ConfirmPasswordResetRequest) returns (ConfirmPasswordResetResponse) { - option (google.api.http) = { - put: "/v1/password-resets/{token}" - body: "*" - }; - option (authorizer.common.v1.public) = true; - option (authorizer.common.v1.audit_log) = true; - } -} - -message CreatePasswordResetRequest { - // Exactly one of email / phone_number is required. - string email = 1 [(buf.validate.field).string.max_len = 320]; - string phone_number = 2 [(buf.validate.field).string.max_len = 32]; - string state = 3; - string redirect_uri = 4; -} - -message CreatePasswordResetResponse { - string message = 1; - // Mobile callers may need to render an OTP entry screen (when reset is - // SMS-driven). Mirrors GraphQL ForgotPasswordResponse. - bool should_show_mobile_otp_screen = 2; -} - -message ConfirmPasswordResetRequest { - // The token from the reset email/SMS; for SMS flows it's the OTP value. - string token = 1 [(buf.validate.field).string.min_len = 1]; - // For SMS flows: the user identifier the OTP was bound to. - string phone_number = 2 [(buf.validate.field).string.max_len = 32]; - string password = 3 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; - string confirm_password = 4 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; -} - -message ConfirmPasswordResetResponse { - string message = 1; -} diff --git a/proto/buf.yaml b/proto/buf.yaml index ba61d5be..25de19df 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -10,6 +10,11 @@ lint: - STANDARD except: - PACKAGE_VERSION_SUFFIX + # The single public service is intentionally named "Authorizer" rather + # than "AuthorizerService" — it's THE authorizer, not "one of many + # services." Matches the project name; users see a single typed client + # in every SDK (authorizerv1.AuthorizerClient). + - SERVICE_SUFFIX ignore: [] breaking: use: From 048d69ffe52ed0699a861ccb58892df522b561a3 Mon Sep 17 00:00:00 2001 From: Lakhan Samani Date: Sat, 30 May 2026 15:24:06 +0530 Subject: [PATCH 2/3] =?UTF-8?q?refactor(proto):=20rename=20service=20Autho?= =?UTF-8?q?rizer=20=E2=86=92=20AuthorizerService?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per review: keep buf STANDARD's SERVICE_SUFFIX rule enforced rather than excepted. The service is now `AuthorizerService`; symbols change to `AuthorizerServiceClient`, `AuthorizerServiceServer`, `RegisterAuthorizerServiceServer`, `RegisterAuthorizerServiceHandler`, `UnimplementedAuthorizerServiceServer`, `NewAuthorizerServiceClient`. Method names + REST paths + MCP tool names are unchanged — only the service identifier moves. The Go handler type stays `AuthorizerHandler` (we don't repeat "Service" at the call site in Go). Files: proto/buf.yaml — removed SERVICE_SUFFIX from `except` proto/authorizer/v1/authorizer.proto — service AuthorizerService { } gen/go/authorizer/v1/** — regenerated gen/openapi/authorizer.swagger.json — regenerated internal/grpcsrv/handlers/authorizer.go — UnimplementedAuthorizerServiceServer internal/grpcsrv/server.go — RegisterAuthorizerServiceServer internal/gateway/mount.go — RegisterAuthorizerServiceHandler internal/integration_tests/grpc_meta_test.go — NewAuthorizerServiceClient internal/integration_tests/grpc_surface_test.go — test renamed; client renamed internal/integration_tests/{rest_meta,mcp_stubs,mcp}_test.go — comment refs Tests: full SQLite integration suite (70s) + all 17 packages green. Co-Authored-By: Claude Opus 4.7 (1M context) --- gen/go/authorizer/v1/authorizer.pb.go | 394 +++++++------- gen/go/authorizer/v1/authorizer.pb.gw.go | 486 +++++++++--------- gen/go/authorizer/v1/authorizer_grpc.pb.go | 399 +++++++------- gen/openapi/authorizer.swagger.json | 78 +-- internal/gateway/mount.go | 4 +- internal/grpcsrv/handlers/authorizer.go | 8 +- internal/grpcsrv/server.go | 10 +- internal/integration_tests/grpc_meta_test.go | 4 +- .../integration_tests/grpc_surface_test.go | 18 +- internal/integration_tests/mcp_stubs_test.go | 2 +- internal/integration_tests/mcp_test.go | 4 +- internal/integration_tests/rest_meta_test.go | 8 +- proto/authorizer/v1/authorizer.proto | 15 +- proto/buf.yaml | 5 - 14 files changed, 718 insertions(+), 717 deletions(-) diff --git a/gen/go/authorizer/v1/authorizer.pb.go b/gen/go/authorizer/v1/authorizer.pb.go index 4655e9f6..d5fe16e8 100644 --- a/gen/go/authorizer/v1/authorizer.pb.go +++ b/gen/go/authorizer/v1/authorizer.pb.go @@ -1,9 +1,10 @@ -// Authorizer is the single gRPC service that exposes Authorizer's public -// API. Method names match the GraphQL operation names 1:1 (snake_case in -// GraphQL → PascalCase in proto): Signup, Login, MagicLinkLogin, VerifyEmail, -// ResendVerifyEmail, ForgotPassword, ResetPassword, VerifyOtp, ResendOtp, -// UpdateProfile, DeactivateAccount, Revoke, Meta, Session, Profile, -// ValidateJwtToken, ValidateSession, Permissions, Logout. +// AuthorizerService is the single gRPC service that exposes Authorizer's +// public API. Method names match the GraphQL operation names 1:1 +// (snake_case in GraphQL → PascalCase in proto): Signup, Login, +// MagicLinkLogin, VerifyEmail, ResendVerifyEmail, ForgotPassword, +// ResetPassword, VerifyOtp, ResendOtp, UpdateProfile, DeactivateAccount, +// Revoke, Meta, Session, Profile, ValidateJwtToken, ValidateSession, +// Permissions, Logout. // // Why one service: clients consume a single typed client per language, // discovery is trivial, and the surface mirrors the GraphQL one users @@ -2519,162 +2520,163 @@ var file_authorizer_v1_authorizer_proto_rawDesc = []byte{ 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xe5, 0x11, 0x0a, 0x0a, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x75, - 0x70, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, - 0x92, 0xb5, 0x18, 0x00, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x75, - 0x70, 0x12, 0x64, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x92, 0xb5, 0x18, 0x00, 0x98, 0xb5, 0x18, 0x01, 0xa0, - 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, - 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x5d, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, - 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, - 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, - 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x86, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x67, 0x69, 0x63, - 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, - 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, - 0x79, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x52, - 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, - 0x12, 0x27, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x26, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, - 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x71, 0x0a, 0x09, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x4f, 0x74, 0x70, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4f, - 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x4f, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x98, 0xb5, 0x18, - 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, - 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x6f, 0x74, 0x70, 0x12, 0x6d, - 0x0a, 0x09, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x12, 0x1f, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, - 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x65, 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, - 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, - 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x74, 0x70, 0x12, 0x81, 0x01, - 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xec, 0x11, 0x0a, 0x11, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, + 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x92, 0xb5, 0x18, 0x00, 0x98, 0xb5, 0x18, 0x01, 0xa0, + 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x92, 0xb5, + 0x18, 0x00, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, + 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x5d, + 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x86, 0x01, + 0x0a, 0x0e, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, + 0x2e, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xa0, - 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, - 0x31, 0x2f, 0x66, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x12, 0x81, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x12, 0x23, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, - 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, - 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x63, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x12, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x19, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x7d, 0x0a, 0x0d, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x11, 0x44, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x27, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, + 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x98, + 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, + 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, + 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x79, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, + 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x98, 0xb5, + 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, + 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x27, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xa0, 0xb5, 0x18, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x72, + 0x65, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x12, 0x71, 0x0a, 0x09, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4f, 0x74, 0x70, 0x12, + 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x21, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x5f, 0x6f, 0x74, 0x70, 0x12, 0x6d, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x4f, + 0x74, 0x70, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x4f, 0x74, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x64, + 0x5f, 0x6f, 0x74, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, + 0x72, 0x67, 0x6f, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x6f, 0x72, 0x67, 0x6f, 0x74, 0x5f, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x81, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, + 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x23, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x98, 0xb5, 0x18, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x63, 0x0a, 0x07, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x12, 0x7d, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x98, + 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, + 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x12, 0x93, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2b, 0x92, 0xb5, 0x18, 0x02, 0x18, 0x01, 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x60, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x12, 0x66, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x92, 0xb5, 0x18, - 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x8a, 0x01, 0x0a, 0x10, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x77, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x77, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, - 0x77, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x25, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, - 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x77, 0x74, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x85, 0x01, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x92, 0xb5, 0x18, 0x02, 0x18, + 0x01, 0x98, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, + 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x98, + 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, + 0x31, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x66, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1c, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, + 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x8a, 0x01, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x77, 0x74, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x77, + 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x77, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x77, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x85, 0x01, + 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xa0, 0xb5, 0x18, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5b, - 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1a, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x73, 0x0a, 0x0b, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1d, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, - 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0xc0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x23, 0xa0, 0xb5, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, + 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1a, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, 0xa0, 0xb5, + 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, + 0x74, 0x61, 0x12, 0x73, 0x0a, 0x0b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x92, 0xb5, 0x18, 0x02, 0x08, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xc0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0d, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -2752,44 +2754,44 @@ var file_authorizer_v1_authorizer_proto_depIdxs = []int32{ 40, // 12: authorizer.v1.ValidateSessionResponse.user:type_name -> authorizer.v1.User 42, // 13: authorizer.v1.MetaResponse.meta:type_name -> authorizer.v1.Meta 43, // 14: authorizer.v1.PermissionsResponse.permissions:type_name -> authorizer.v1.Permission - 0, // 15: authorizer.v1.Authorizer.Signup:input_type -> authorizer.v1.SignupRequest - 2, // 16: authorizer.v1.Authorizer.Login:input_type -> authorizer.v1.LoginRequest - 4, // 17: authorizer.v1.Authorizer.Logout:input_type -> authorizer.v1.LogoutRequest - 6, // 18: authorizer.v1.Authorizer.MagicLinkLogin:input_type -> authorizer.v1.MagicLinkLoginRequest - 8, // 19: authorizer.v1.Authorizer.VerifyEmail:input_type -> authorizer.v1.VerifyEmailRequest - 10, // 20: authorizer.v1.Authorizer.ResendVerifyEmail:input_type -> authorizer.v1.ResendVerifyEmailRequest - 12, // 21: authorizer.v1.Authorizer.VerifyOtp:input_type -> authorizer.v1.VerifyOtpRequest - 14, // 22: authorizer.v1.Authorizer.ResendOtp:input_type -> authorizer.v1.ResendOtpRequest - 16, // 23: authorizer.v1.Authorizer.ForgotPassword:input_type -> authorizer.v1.ForgotPasswordRequest - 18, // 24: authorizer.v1.Authorizer.ResetPassword:input_type -> authorizer.v1.ResetPasswordRequest - 20, // 25: authorizer.v1.Authorizer.Profile:input_type -> authorizer.v1.ProfileRequest - 22, // 26: authorizer.v1.Authorizer.UpdateProfile:input_type -> authorizer.v1.UpdateProfileRequest - 24, // 27: authorizer.v1.Authorizer.DeactivateAccount:input_type -> authorizer.v1.DeactivateAccountRequest - 26, // 28: authorizer.v1.Authorizer.Revoke:input_type -> authorizer.v1.RevokeRequest - 28, // 29: authorizer.v1.Authorizer.Session:input_type -> authorizer.v1.SessionRequest - 30, // 30: authorizer.v1.Authorizer.ValidateJwtToken:input_type -> authorizer.v1.ValidateJwtTokenRequest - 32, // 31: authorizer.v1.Authorizer.ValidateSession:input_type -> authorizer.v1.ValidateSessionRequest - 34, // 32: authorizer.v1.Authorizer.Meta:input_type -> authorizer.v1.MetaRequest - 36, // 33: authorizer.v1.Authorizer.Permissions:input_type -> authorizer.v1.PermissionsRequest - 1, // 34: authorizer.v1.Authorizer.Signup:output_type -> authorizer.v1.SignupResponse - 3, // 35: authorizer.v1.Authorizer.Login:output_type -> authorizer.v1.LoginResponse - 5, // 36: authorizer.v1.Authorizer.Logout:output_type -> authorizer.v1.LogoutResponse - 7, // 37: authorizer.v1.Authorizer.MagicLinkLogin:output_type -> authorizer.v1.MagicLinkLoginResponse - 9, // 38: authorizer.v1.Authorizer.VerifyEmail:output_type -> authorizer.v1.VerifyEmailResponse - 11, // 39: authorizer.v1.Authorizer.ResendVerifyEmail:output_type -> authorizer.v1.ResendVerifyEmailResponse - 13, // 40: authorizer.v1.Authorizer.VerifyOtp:output_type -> authorizer.v1.VerifyOtpResponse - 15, // 41: authorizer.v1.Authorizer.ResendOtp:output_type -> authorizer.v1.ResendOtpResponse - 17, // 42: authorizer.v1.Authorizer.ForgotPassword:output_type -> authorizer.v1.ForgotPasswordResponse - 19, // 43: authorizer.v1.Authorizer.ResetPassword:output_type -> authorizer.v1.ResetPasswordResponse - 21, // 44: authorizer.v1.Authorizer.Profile:output_type -> authorizer.v1.ProfileResponse - 23, // 45: authorizer.v1.Authorizer.UpdateProfile:output_type -> authorizer.v1.UpdateProfileResponse - 25, // 46: authorizer.v1.Authorizer.DeactivateAccount:output_type -> authorizer.v1.DeactivateAccountResponse - 27, // 47: authorizer.v1.Authorizer.Revoke:output_type -> authorizer.v1.RevokeResponse - 29, // 48: authorizer.v1.Authorizer.Session:output_type -> authorizer.v1.SessionResponse - 31, // 49: authorizer.v1.Authorizer.ValidateJwtToken:output_type -> authorizer.v1.ValidateJwtTokenResponse - 33, // 50: authorizer.v1.Authorizer.ValidateSession:output_type -> authorizer.v1.ValidateSessionResponse - 35, // 51: authorizer.v1.Authorizer.Meta:output_type -> authorizer.v1.MetaResponse - 37, // 52: authorizer.v1.Authorizer.Permissions:output_type -> authorizer.v1.PermissionsResponse + 0, // 15: authorizer.v1.AuthorizerService.Signup:input_type -> authorizer.v1.SignupRequest + 2, // 16: authorizer.v1.AuthorizerService.Login:input_type -> authorizer.v1.LoginRequest + 4, // 17: authorizer.v1.AuthorizerService.Logout:input_type -> authorizer.v1.LogoutRequest + 6, // 18: authorizer.v1.AuthorizerService.MagicLinkLogin:input_type -> authorizer.v1.MagicLinkLoginRequest + 8, // 19: authorizer.v1.AuthorizerService.VerifyEmail:input_type -> authorizer.v1.VerifyEmailRequest + 10, // 20: authorizer.v1.AuthorizerService.ResendVerifyEmail:input_type -> authorizer.v1.ResendVerifyEmailRequest + 12, // 21: authorizer.v1.AuthorizerService.VerifyOtp:input_type -> authorizer.v1.VerifyOtpRequest + 14, // 22: authorizer.v1.AuthorizerService.ResendOtp:input_type -> authorizer.v1.ResendOtpRequest + 16, // 23: authorizer.v1.AuthorizerService.ForgotPassword:input_type -> authorizer.v1.ForgotPasswordRequest + 18, // 24: authorizer.v1.AuthorizerService.ResetPassword:input_type -> authorizer.v1.ResetPasswordRequest + 20, // 25: authorizer.v1.AuthorizerService.Profile:input_type -> authorizer.v1.ProfileRequest + 22, // 26: authorizer.v1.AuthorizerService.UpdateProfile:input_type -> authorizer.v1.UpdateProfileRequest + 24, // 27: authorizer.v1.AuthorizerService.DeactivateAccount:input_type -> authorizer.v1.DeactivateAccountRequest + 26, // 28: authorizer.v1.AuthorizerService.Revoke:input_type -> authorizer.v1.RevokeRequest + 28, // 29: authorizer.v1.AuthorizerService.Session:input_type -> authorizer.v1.SessionRequest + 30, // 30: authorizer.v1.AuthorizerService.ValidateJwtToken:input_type -> authorizer.v1.ValidateJwtTokenRequest + 32, // 31: authorizer.v1.AuthorizerService.ValidateSession:input_type -> authorizer.v1.ValidateSessionRequest + 34, // 32: authorizer.v1.AuthorizerService.Meta:input_type -> authorizer.v1.MetaRequest + 36, // 33: authorizer.v1.AuthorizerService.Permissions:input_type -> authorizer.v1.PermissionsRequest + 1, // 34: authorizer.v1.AuthorizerService.Signup:output_type -> authorizer.v1.SignupResponse + 3, // 35: authorizer.v1.AuthorizerService.Login:output_type -> authorizer.v1.LoginResponse + 5, // 36: authorizer.v1.AuthorizerService.Logout:output_type -> authorizer.v1.LogoutResponse + 7, // 37: authorizer.v1.AuthorizerService.MagicLinkLogin:output_type -> authorizer.v1.MagicLinkLoginResponse + 9, // 38: authorizer.v1.AuthorizerService.VerifyEmail:output_type -> authorizer.v1.VerifyEmailResponse + 11, // 39: authorizer.v1.AuthorizerService.ResendVerifyEmail:output_type -> authorizer.v1.ResendVerifyEmailResponse + 13, // 40: authorizer.v1.AuthorizerService.VerifyOtp:output_type -> authorizer.v1.VerifyOtpResponse + 15, // 41: authorizer.v1.AuthorizerService.ResendOtp:output_type -> authorizer.v1.ResendOtpResponse + 17, // 42: authorizer.v1.AuthorizerService.ForgotPassword:output_type -> authorizer.v1.ForgotPasswordResponse + 19, // 43: authorizer.v1.AuthorizerService.ResetPassword:output_type -> authorizer.v1.ResetPasswordResponse + 21, // 44: authorizer.v1.AuthorizerService.Profile:output_type -> authorizer.v1.ProfileResponse + 23, // 45: authorizer.v1.AuthorizerService.UpdateProfile:output_type -> authorizer.v1.UpdateProfileResponse + 25, // 46: authorizer.v1.AuthorizerService.DeactivateAccount:output_type -> authorizer.v1.DeactivateAccountResponse + 27, // 47: authorizer.v1.AuthorizerService.Revoke:output_type -> authorizer.v1.RevokeResponse + 29, // 48: authorizer.v1.AuthorizerService.Session:output_type -> authorizer.v1.SessionResponse + 31, // 49: authorizer.v1.AuthorizerService.ValidateJwtToken:output_type -> authorizer.v1.ValidateJwtTokenResponse + 33, // 50: authorizer.v1.AuthorizerService.ValidateSession:output_type -> authorizer.v1.ValidateSessionResponse + 35, // 51: authorizer.v1.AuthorizerService.Meta:output_type -> authorizer.v1.MetaResponse + 37, // 52: authorizer.v1.AuthorizerService.Permissions:output_type -> authorizer.v1.PermissionsResponse 34, // [34:53] is the sub-list for method output_type 15, // [15:34] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name diff --git a/gen/go/authorizer/v1/authorizer.pb.gw.go b/gen/go/authorizer/v1/authorizer.pb.gw.go index ab35c970..175e390c 100644 --- a/gen/go/authorizer/v1/authorizer.pb.gw.go +++ b/gen/go/authorizer/v1/authorizer.pb.gw.go @@ -31,7 +31,7 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -func request_Authorizer_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SignupRequest var metadata runtime.ServerMetadata @@ -44,7 +44,7 @@ func request_Authorizer_Signup_0(ctx context.Context, marshaler runtime.Marshale } -func local_request_Authorizer_Signup_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_Signup_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SignupRequest var metadata runtime.ServerMetadata @@ -57,7 +57,7 @@ func local_request_Authorizer_Signup_0(ctx context.Context, marshaler runtime.Ma } -func request_Authorizer_Login_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_Login_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LoginRequest var metadata runtime.ServerMetadata @@ -70,7 +70,7 @@ func request_Authorizer_Login_0(ctx context.Context, marshaler runtime.Marshaler } -func local_request_Authorizer_Login_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_Login_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LoginRequest var metadata runtime.ServerMetadata @@ -83,7 +83,7 @@ func local_request_Authorizer_Login_0(ctx context.Context, marshaler runtime.Mar } -func request_Authorizer_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LogoutRequest var metadata runtime.ServerMetadata @@ -92,7 +92,7 @@ func request_Authorizer_Logout_0(ctx context.Context, marshaler runtime.Marshale } -func local_request_Authorizer_Logout_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_Logout_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LogoutRequest var metadata runtime.ServerMetadata @@ -101,7 +101,7 @@ func local_request_Authorizer_Logout_0(ctx context.Context, marshaler runtime.Ma } -func request_Authorizer_MagicLinkLogin_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_MagicLinkLogin_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MagicLinkLoginRequest var metadata runtime.ServerMetadata @@ -114,7 +114,7 @@ func request_Authorizer_MagicLinkLogin_0(ctx context.Context, marshaler runtime. } -func local_request_Authorizer_MagicLinkLogin_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_MagicLinkLogin_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MagicLinkLoginRequest var metadata runtime.ServerMetadata @@ -127,7 +127,7 @@ func local_request_Authorizer_MagicLinkLogin_0(ctx context.Context, marshaler ru } -func request_Authorizer_VerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_VerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq VerifyEmailRequest var metadata runtime.ServerMetadata @@ -140,7 +140,7 @@ func request_Authorizer_VerifyEmail_0(ctx context.Context, marshaler runtime.Mar } -func local_request_Authorizer_VerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_VerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq VerifyEmailRequest var metadata runtime.ServerMetadata @@ -153,7 +153,7 @@ func local_request_Authorizer_VerifyEmail_0(ctx context.Context, marshaler runti } -func request_Authorizer_ResendVerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_ResendVerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ResendVerifyEmailRequest var metadata runtime.ServerMetadata @@ -166,7 +166,7 @@ func request_Authorizer_ResendVerifyEmail_0(ctx context.Context, marshaler runti } -func local_request_Authorizer_ResendVerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_ResendVerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ResendVerifyEmailRequest var metadata runtime.ServerMetadata @@ -179,7 +179,7 @@ func local_request_Authorizer_ResendVerifyEmail_0(ctx context.Context, marshaler } -func request_Authorizer_VerifyOtp_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_VerifyOtp_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq VerifyOtpRequest var metadata runtime.ServerMetadata @@ -192,7 +192,7 @@ func request_Authorizer_VerifyOtp_0(ctx context.Context, marshaler runtime.Marsh } -func local_request_Authorizer_VerifyOtp_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_VerifyOtp_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq VerifyOtpRequest var metadata runtime.ServerMetadata @@ -205,7 +205,7 @@ func local_request_Authorizer_VerifyOtp_0(ctx context.Context, marshaler runtime } -func request_Authorizer_ResendOtp_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_ResendOtp_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ResendOtpRequest var metadata runtime.ServerMetadata @@ -218,7 +218,7 @@ func request_Authorizer_ResendOtp_0(ctx context.Context, marshaler runtime.Marsh } -func local_request_Authorizer_ResendOtp_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_ResendOtp_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ResendOtpRequest var metadata runtime.ServerMetadata @@ -231,7 +231,7 @@ func local_request_Authorizer_ResendOtp_0(ctx context.Context, marshaler runtime } -func request_Authorizer_ForgotPassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_ForgotPassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ForgotPasswordRequest var metadata runtime.ServerMetadata @@ -244,7 +244,7 @@ func request_Authorizer_ForgotPassword_0(ctx context.Context, marshaler runtime. } -func local_request_Authorizer_ForgotPassword_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_ForgotPassword_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ForgotPasswordRequest var metadata runtime.ServerMetadata @@ -257,7 +257,7 @@ func local_request_Authorizer_ForgotPassword_0(ctx context.Context, marshaler ru } -func request_Authorizer_ResetPassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_ResetPassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ResetPasswordRequest var metadata runtime.ServerMetadata @@ -270,7 +270,7 @@ func request_Authorizer_ResetPassword_0(ctx context.Context, marshaler runtime.M } -func local_request_Authorizer_ResetPassword_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_ResetPassword_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ResetPasswordRequest var metadata runtime.ServerMetadata @@ -283,7 +283,7 @@ func local_request_Authorizer_ResetPassword_0(ctx context.Context, marshaler run } -func request_Authorizer_Profile_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_Profile_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ProfileRequest var metadata runtime.ServerMetadata @@ -292,7 +292,7 @@ func request_Authorizer_Profile_0(ctx context.Context, marshaler runtime.Marshal } -func local_request_Authorizer_Profile_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_Profile_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ProfileRequest var metadata runtime.ServerMetadata @@ -301,7 +301,7 @@ func local_request_Authorizer_Profile_0(ctx context.Context, marshaler runtime.M } -func request_Authorizer_UpdateProfile_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_UpdateProfile_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateProfileRequest var metadata runtime.ServerMetadata @@ -314,7 +314,7 @@ func request_Authorizer_UpdateProfile_0(ctx context.Context, marshaler runtime.M } -func local_request_Authorizer_UpdateProfile_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_UpdateProfile_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateProfileRequest var metadata runtime.ServerMetadata @@ -327,7 +327,7 @@ func local_request_Authorizer_UpdateProfile_0(ctx context.Context, marshaler run } -func request_Authorizer_DeactivateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_DeactivateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeactivateAccountRequest var metadata runtime.ServerMetadata @@ -340,7 +340,7 @@ func request_Authorizer_DeactivateAccount_0(ctx context.Context, marshaler runti } -func local_request_Authorizer_DeactivateAccount_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_DeactivateAccount_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeactivateAccountRequest var metadata runtime.ServerMetadata @@ -353,7 +353,7 @@ func local_request_Authorizer_DeactivateAccount_0(ctx context.Context, marshaler } -func request_Authorizer_Revoke_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_Revoke_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RevokeRequest var metadata runtime.ServerMetadata @@ -366,7 +366,7 @@ func request_Authorizer_Revoke_0(ctx context.Context, marshaler runtime.Marshale } -func local_request_Authorizer_Revoke_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_Revoke_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RevokeRequest var metadata runtime.ServerMetadata @@ -379,7 +379,7 @@ func local_request_Authorizer_Revoke_0(ctx context.Context, marshaler runtime.Ma } -func request_Authorizer_Session_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_Session_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SessionRequest var metadata runtime.ServerMetadata @@ -392,7 +392,7 @@ func request_Authorizer_Session_0(ctx context.Context, marshaler runtime.Marshal } -func local_request_Authorizer_Session_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_Session_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SessionRequest var metadata runtime.ServerMetadata @@ -405,7 +405,7 @@ func local_request_Authorizer_Session_0(ctx context.Context, marshaler runtime.M } -func request_Authorizer_ValidateJwtToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_ValidateJwtToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ValidateJwtTokenRequest var metadata runtime.ServerMetadata @@ -418,7 +418,7 @@ func request_Authorizer_ValidateJwtToken_0(ctx context.Context, marshaler runtim } -func local_request_Authorizer_ValidateJwtToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_ValidateJwtToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ValidateJwtTokenRequest var metadata runtime.ServerMetadata @@ -431,7 +431,7 @@ func local_request_Authorizer_ValidateJwtToken_0(ctx context.Context, marshaler } -func request_Authorizer_ValidateSession_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_ValidateSession_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ValidateSessionRequest var metadata runtime.ServerMetadata @@ -444,7 +444,7 @@ func request_Authorizer_ValidateSession_0(ctx context.Context, marshaler runtime } -func local_request_Authorizer_ValidateSession_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_ValidateSession_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ValidateSessionRequest var metadata runtime.ServerMetadata @@ -457,7 +457,7 @@ func local_request_Authorizer_ValidateSession_0(ctx context.Context, marshaler r } -func request_Authorizer_Meta_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_Meta_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MetaRequest var metadata runtime.ServerMetadata @@ -466,7 +466,7 @@ func request_Authorizer_Meta_0(ctx context.Context, marshaler runtime.Marshaler, } -func local_request_Authorizer_Meta_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_Meta_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MetaRequest var metadata runtime.ServerMetadata @@ -475,7 +475,7 @@ func local_request_Authorizer_Meta_0(ctx context.Context, marshaler runtime.Mars } -func request_Authorizer_Permissions_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AuthorizerService_Permissions_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq PermissionsRequest var metadata runtime.ServerMetadata @@ -484,7 +484,7 @@ func request_Authorizer_Permissions_0(ctx context.Context, marshaler runtime.Mar } -func local_request_Authorizer_Permissions_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AuthorizerService_Permissions_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq PermissionsRequest var metadata runtime.ServerMetadata @@ -493,14 +493,14 @@ func local_request_Authorizer_Permissions_0(ctx context.Context, marshaler runti } -// RegisterAuthorizerHandlerServer registers the http handlers for service Authorizer to "mux". -// UnaryRPC :call AuthorizerServer directly. +// RegisterAuthorizerServiceHandlerServer registers the http handlers for service AuthorizerService to "mux". +// UnaryRPC :call AuthorizerServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthorizerHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthorizerServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthorizerServer) error { +func RegisterAuthorizerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthorizerServiceServer) error { - mux.Handle("POST", pattern_Authorizer_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -508,12 +508,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Signup", runtime.WithHTTPPathPattern("/v1/signup")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Signup", runtime.WithHTTPPathPattern("/v1/signup")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_Signup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_Signup_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -521,11 +521,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_Signup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Signup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -533,12 +533,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Login", runtime.WithHTTPPathPattern("/v1/login")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Login", runtime.WithHTTPPathPattern("/v1/login")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_Login_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_Login_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -546,11 +546,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Authorizer_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AuthorizerService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -558,12 +558,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Logout", runtime.WithHTTPPathPattern("/v1/logout")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Logout", runtime.WithHTTPPathPattern("/v1/logout")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_Logout_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_Logout_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -571,11 +571,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_MagicLinkLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_MagicLinkLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -583,12 +583,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/MagicLinkLogin", runtime.WithHTTPPathPattern("/v1/magic_link_login")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/MagicLinkLogin", runtime.WithHTTPPathPattern("/v1/magic_link_login")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_MagicLinkLogin_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_MagicLinkLogin_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -596,11 +596,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_MagicLinkLogin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_MagicLinkLogin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_VerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_VerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -608,12 +608,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/VerifyEmail", runtime.WithHTTPPathPattern("/v1/verify_email")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/VerifyEmail", runtime.WithHTTPPathPattern("/v1/verify_email")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_VerifyEmail_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_VerifyEmail_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -621,11 +621,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_VerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_VerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ResendVerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ResendVerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -633,12 +633,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResendVerifyEmail", runtime.WithHTTPPathPattern("/v1/resend_verify_email")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ResendVerifyEmail", runtime.WithHTTPPathPattern("/v1/resend_verify_email")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_ResendVerifyEmail_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_ResendVerifyEmail_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -646,11 +646,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_ResendVerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ResendVerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_VerifyOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_VerifyOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -658,12 +658,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/VerifyOtp", runtime.WithHTTPPathPattern("/v1/verify_otp")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/VerifyOtp", runtime.WithHTTPPathPattern("/v1/verify_otp")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_VerifyOtp_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_VerifyOtp_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -671,11 +671,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_VerifyOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_VerifyOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ResendOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ResendOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -683,12 +683,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResendOtp", runtime.WithHTTPPathPattern("/v1/resend_otp")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ResendOtp", runtime.WithHTTPPathPattern("/v1/resend_otp")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_ResendOtp_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_ResendOtp_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -696,11 +696,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_ResendOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ResendOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ForgotPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ForgotPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -708,12 +708,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ForgotPassword", runtime.WithHTTPPathPattern("/v1/forgot_password")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ForgotPassword", runtime.WithHTTPPathPattern("/v1/forgot_password")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_ForgotPassword_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_ForgotPassword_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -721,11 +721,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_ForgotPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ForgotPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ResetPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ResetPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -733,12 +733,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResetPassword", runtime.WithHTTPPathPattern("/v1/reset_password")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ResetPassword", runtime.WithHTTPPathPattern("/v1/reset_password")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_ResetPassword_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_ResetPassword_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -746,11 +746,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_ResetPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ResetPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Authorizer_Profile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AuthorizerService_Profile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -758,12 +758,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Profile", runtime.WithHTTPPathPattern("/v1/profile")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Profile", runtime.WithHTTPPathPattern("/v1/profile")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_Profile_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_Profile_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -771,11 +771,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_Profile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Profile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_UpdateProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_UpdateProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -783,12 +783,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/UpdateProfile", runtime.WithHTTPPathPattern("/v1/update_profile")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/UpdateProfile", runtime.WithHTTPPathPattern("/v1/update_profile")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_UpdateProfile_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_UpdateProfile_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -796,11 +796,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_UpdateProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_UpdateProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_DeactivateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_DeactivateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -808,12 +808,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/DeactivateAccount", runtime.WithHTTPPathPattern("/v1/deactivate_account")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/DeactivateAccount", runtime.WithHTTPPathPattern("/v1/deactivate_account")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_DeactivateAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_DeactivateAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -821,11 +821,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_DeactivateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_DeactivateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_Revoke_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_Revoke_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -833,12 +833,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Revoke", runtime.WithHTTPPathPattern("/v1/revoke")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Revoke", runtime.WithHTTPPathPattern("/v1/revoke")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_Revoke_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_Revoke_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -846,11 +846,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_Revoke_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Revoke_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_Session_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_Session_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -858,12 +858,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Session", runtime.WithHTTPPathPattern("/v1/session")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Session", runtime.WithHTTPPathPattern("/v1/session")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_Session_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_Session_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -871,11 +871,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_Session_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Session_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ValidateJwtToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ValidateJwtToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -883,12 +883,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ValidateJwtToken", runtime.WithHTTPPathPattern("/v1/validate_jwt_token")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ValidateJwtToken", runtime.WithHTTPPathPattern("/v1/validate_jwt_token")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_ValidateJwtToken_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_ValidateJwtToken_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -896,11 +896,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_ValidateJwtToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ValidateJwtToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ValidateSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ValidateSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -908,12 +908,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/ValidateSession", runtime.WithHTTPPathPattern("/v1/validate_session")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ValidateSession", runtime.WithHTTPPathPattern("/v1/validate_session")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_ValidateSession_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_ValidateSession_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -921,11 +921,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_ValidateSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ValidateSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Authorizer_Meta_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AuthorizerService_Meta_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -933,12 +933,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Meta", runtime.WithHTTPPathPattern("/v1/meta")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Meta", runtime.WithHTTPPathPattern("/v1/meta")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_Meta_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_Meta_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -946,11 +946,11 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_Meta_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Meta_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Authorizer_Permissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AuthorizerService_Permissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -958,12 +958,12 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.Authorizer/Permissions", runtime.WithHTTPPathPattern("/v1/permissions")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Permissions", runtime.WithHTTPPathPattern("/v1/permissions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Authorizer_Permissions_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthorizerService_Permissions_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -971,16 +971,16 @@ func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_Authorizer_Permissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Permissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } -// RegisterAuthorizerHandlerFromEndpoint is same as RegisterAuthorizerHandler but +// RegisterAuthorizerServiceHandlerFromEndpoint is same as RegisterAuthorizerServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAuthorizerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterAuthorizerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err @@ -1000,437 +1000,437 @@ func RegisterAuthorizerHandlerFromEndpoint(ctx context.Context, mux *runtime.Ser }() }() - return RegisterAuthorizerHandler(ctx, mux, conn) + return RegisterAuthorizerServiceHandler(ctx, mux, conn) } -// RegisterAuthorizerHandler registers the http handlers for service Authorizer to "mux". +// RegisterAuthorizerServiceHandler registers the http handlers for service AuthorizerService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterAuthorizerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAuthorizerHandlerClient(ctx, mux, NewAuthorizerClient(conn)) +func RegisterAuthorizerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAuthorizerServiceHandlerClient(ctx, mux, NewAuthorizerServiceClient(conn)) } -// RegisterAuthorizerHandlerClient registers the http handlers for service Authorizer -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthorizerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthorizerClient" +// RegisterAuthorizerServiceHandlerClient registers the http handlers for service AuthorizerService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthorizerServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthorizerServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AuthorizerClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterAuthorizerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthorizerClient) error { +// "AuthorizerServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterAuthorizerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthorizerServiceClient) error { - mux.Handle("POST", pattern_Authorizer_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Signup", runtime.WithHTTPPathPattern("/v1/signup")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Signup", runtime.WithHTTPPathPattern("/v1/signup")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_Signup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_Signup_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_Signup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Signup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Login", runtime.WithHTTPPathPattern("/v1/login")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Login", runtime.WithHTTPPathPattern("/v1/login")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_Login_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_Login_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Authorizer_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AuthorizerService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Logout", runtime.WithHTTPPathPattern("/v1/logout")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Logout", runtime.WithHTTPPathPattern("/v1/logout")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_Logout_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_Logout_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_MagicLinkLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_MagicLinkLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/MagicLinkLogin", runtime.WithHTTPPathPattern("/v1/magic_link_login")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/MagicLinkLogin", runtime.WithHTTPPathPattern("/v1/magic_link_login")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_MagicLinkLogin_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_MagicLinkLogin_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_MagicLinkLogin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_MagicLinkLogin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_VerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_VerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/VerifyEmail", runtime.WithHTTPPathPattern("/v1/verify_email")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/VerifyEmail", runtime.WithHTTPPathPattern("/v1/verify_email")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_VerifyEmail_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_VerifyEmail_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_VerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_VerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ResendVerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ResendVerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResendVerifyEmail", runtime.WithHTTPPathPattern("/v1/resend_verify_email")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ResendVerifyEmail", runtime.WithHTTPPathPattern("/v1/resend_verify_email")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_ResendVerifyEmail_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_ResendVerifyEmail_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_ResendVerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ResendVerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_VerifyOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_VerifyOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/VerifyOtp", runtime.WithHTTPPathPattern("/v1/verify_otp")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/VerifyOtp", runtime.WithHTTPPathPattern("/v1/verify_otp")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_VerifyOtp_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_VerifyOtp_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_VerifyOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_VerifyOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ResendOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ResendOtp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResendOtp", runtime.WithHTTPPathPattern("/v1/resend_otp")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ResendOtp", runtime.WithHTTPPathPattern("/v1/resend_otp")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_ResendOtp_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_ResendOtp_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_ResendOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ResendOtp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ForgotPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ForgotPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ForgotPassword", runtime.WithHTTPPathPattern("/v1/forgot_password")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ForgotPassword", runtime.WithHTTPPathPattern("/v1/forgot_password")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_ForgotPassword_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_ForgotPassword_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_ForgotPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ForgotPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ResetPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ResetPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ResetPassword", runtime.WithHTTPPathPattern("/v1/reset_password")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ResetPassword", runtime.WithHTTPPathPattern("/v1/reset_password")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_ResetPassword_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_ResetPassword_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_ResetPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ResetPassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Authorizer_Profile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AuthorizerService_Profile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Profile", runtime.WithHTTPPathPattern("/v1/profile")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Profile", runtime.WithHTTPPathPattern("/v1/profile")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_Profile_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_Profile_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_Profile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Profile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_UpdateProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_UpdateProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/UpdateProfile", runtime.WithHTTPPathPattern("/v1/update_profile")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/UpdateProfile", runtime.WithHTTPPathPattern("/v1/update_profile")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_UpdateProfile_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_UpdateProfile_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_UpdateProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_UpdateProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_DeactivateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_DeactivateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/DeactivateAccount", runtime.WithHTTPPathPattern("/v1/deactivate_account")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/DeactivateAccount", runtime.WithHTTPPathPattern("/v1/deactivate_account")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_DeactivateAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_DeactivateAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_DeactivateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_DeactivateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_Revoke_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_Revoke_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Revoke", runtime.WithHTTPPathPattern("/v1/revoke")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Revoke", runtime.WithHTTPPathPattern("/v1/revoke")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_Revoke_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_Revoke_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_Revoke_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Revoke_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_Session_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_Session_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Session", runtime.WithHTTPPathPattern("/v1/session")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Session", runtime.WithHTTPPathPattern("/v1/session")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_Session_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_Session_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_Session_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Session_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ValidateJwtToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ValidateJwtToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ValidateJwtToken", runtime.WithHTTPPathPattern("/v1/validate_jwt_token")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ValidateJwtToken", runtime.WithHTTPPathPattern("/v1/validate_jwt_token")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_ValidateJwtToken_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_ValidateJwtToken_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_ValidateJwtToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ValidateJwtToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Authorizer_ValidateSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AuthorizerService_ValidateSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/ValidateSession", runtime.WithHTTPPathPattern("/v1/validate_session")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/ValidateSession", runtime.WithHTTPPathPattern("/v1/validate_session")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_ValidateSession_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_ValidateSession_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_ValidateSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_ValidateSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Authorizer_Meta_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AuthorizerService_Meta_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Meta", runtime.WithHTTPPathPattern("/v1/meta")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Meta", runtime.WithHTTPPathPattern("/v1/meta")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_Meta_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_Meta_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_Meta_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Meta_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Authorizer_Permissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AuthorizerService_Permissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.Authorizer/Permissions", runtime.WithHTTPPathPattern("/v1/permissions")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/authorizer.v1.AuthorizerService/Permissions", runtime.WithHTTPPathPattern("/v1/permissions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Authorizer_Permissions_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AuthorizerService_Permissions_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Authorizer_Permissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthorizerService_Permissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1438,81 +1438,81 @@ func RegisterAuthorizerHandlerClient(ctx context.Context, mux *runtime.ServeMux, } var ( - pattern_Authorizer_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "signup"}, "")) + pattern_AuthorizerService_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "signup"}, "")) - pattern_Authorizer_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "login"}, "")) + pattern_AuthorizerService_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "login"}, "")) - pattern_Authorizer_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "logout"}, "")) + pattern_AuthorizerService_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "logout"}, "")) - pattern_Authorizer_MagicLinkLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "magic_link_login"}, "")) + pattern_AuthorizerService_MagicLinkLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "magic_link_login"}, "")) - pattern_Authorizer_VerifyEmail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "verify_email"}, "")) + pattern_AuthorizerService_VerifyEmail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "verify_email"}, "")) - pattern_Authorizer_ResendVerifyEmail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "resend_verify_email"}, "")) + pattern_AuthorizerService_ResendVerifyEmail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "resend_verify_email"}, "")) - pattern_Authorizer_VerifyOtp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "verify_otp"}, "")) + pattern_AuthorizerService_VerifyOtp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "verify_otp"}, "")) - pattern_Authorizer_ResendOtp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "resend_otp"}, "")) + pattern_AuthorizerService_ResendOtp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "resend_otp"}, "")) - pattern_Authorizer_ForgotPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "forgot_password"}, "")) + pattern_AuthorizerService_ForgotPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "forgot_password"}, "")) - pattern_Authorizer_ResetPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "reset_password"}, "")) + pattern_AuthorizerService_ResetPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "reset_password"}, "")) - pattern_Authorizer_Profile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "profile"}, "")) + pattern_AuthorizerService_Profile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "profile"}, "")) - pattern_Authorizer_UpdateProfile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "update_profile"}, "")) + pattern_AuthorizerService_UpdateProfile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "update_profile"}, "")) - pattern_Authorizer_DeactivateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "deactivate_account"}, "")) + pattern_AuthorizerService_DeactivateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "deactivate_account"}, "")) - pattern_Authorizer_Revoke_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "revoke"}, "")) + pattern_AuthorizerService_Revoke_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "revoke"}, "")) - pattern_Authorizer_Session_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "session"}, "")) + pattern_AuthorizerService_Session_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "session"}, "")) - pattern_Authorizer_ValidateJwtToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "validate_jwt_token"}, "")) + pattern_AuthorizerService_ValidateJwtToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "validate_jwt_token"}, "")) - pattern_Authorizer_ValidateSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "validate_session"}, "")) + pattern_AuthorizerService_ValidateSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "validate_session"}, "")) - pattern_Authorizer_Meta_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "meta"}, "")) + pattern_AuthorizerService_Meta_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "meta"}, "")) - pattern_Authorizer_Permissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "permissions"}, "")) + pattern_AuthorizerService_Permissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "permissions"}, "")) ) var ( - forward_Authorizer_Signup_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_Signup_0 = runtime.ForwardResponseMessage - forward_Authorizer_Login_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_Login_0 = runtime.ForwardResponseMessage - forward_Authorizer_Logout_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_Logout_0 = runtime.ForwardResponseMessage - forward_Authorizer_MagicLinkLogin_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_MagicLinkLogin_0 = runtime.ForwardResponseMessage - forward_Authorizer_VerifyEmail_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_VerifyEmail_0 = runtime.ForwardResponseMessage - forward_Authorizer_ResendVerifyEmail_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_ResendVerifyEmail_0 = runtime.ForwardResponseMessage - forward_Authorizer_VerifyOtp_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_VerifyOtp_0 = runtime.ForwardResponseMessage - forward_Authorizer_ResendOtp_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_ResendOtp_0 = runtime.ForwardResponseMessage - forward_Authorizer_ForgotPassword_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_ForgotPassword_0 = runtime.ForwardResponseMessage - forward_Authorizer_ResetPassword_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_ResetPassword_0 = runtime.ForwardResponseMessage - forward_Authorizer_Profile_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_Profile_0 = runtime.ForwardResponseMessage - forward_Authorizer_UpdateProfile_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_UpdateProfile_0 = runtime.ForwardResponseMessage - forward_Authorizer_DeactivateAccount_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_DeactivateAccount_0 = runtime.ForwardResponseMessage - forward_Authorizer_Revoke_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_Revoke_0 = runtime.ForwardResponseMessage - forward_Authorizer_Session_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_Session_0 = runtime.ForwardResponseMessage - forward_Authorizer_ValidateJwtToken_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_ValidateJwtToken_0 = runtime.ForwardResponseMessage - forward_Authorizer_ValidateSession_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_ValidateSession_0 = runtime.ForwardResponseMessage - forward_Authorizer_Meta_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_Meta_0 = runtime.ForwardResponseMessage - forward_Authorizer_Permissions_0 = runtime.ForwardResponseMessage + forward_AuthorizerService_Permissions_0 = runtime.ForwardResponseMessage ) diff --git a/gen/go/authorizer/v1/authorizer_grpc.pb.go b/gen/go/authorizer/v1/authorizer_grpc.pb.go index 88157eee..14bf3b49 100644 --- a/gen/go/authorizer/v1/authorizer_grpc.pb.go +++ b/gen/go/authorizer/v1/authorizer_grpc.pb.go @@ -1,9 +1,10 @@ -// Authorizer is the single gRPC service that exposes Authorizer's public -// API. Method names match the GraphQL operation names 1:1 (snake_case in -// GraphQL → PascalCase in proto): Signup, Login, MagicLinkLogin, VerifyEmail, -// ResendVerifyEmail, ForgotPassword, ResetPassword, VerifyOtp, ResendOtp, -// UpdateProfile, DeactivateAccount, Revoke, Meta, Session, Profile, -// ValidateJwtToken, ValidateSession, Permissions, Logout. +// AuthorizerService is the single gRPC service that exposes Authorizer's +// public API. Method names match the GraphQL operation names 1:1 +// (snake_case in GraphQL → PascalCase in proto): Signup, Login, +// MagicLinkLogin, VerifyEmail, ResendVerifyEmail, ForgotPassword, +// ResetPassword, VerifyOtp, ResendOtp, UpdateProfile, DeactivateAccount, +// Revoke, Meta, Session, Profile, ValidateJwtToken, ValidateSession, +// Permissions, Logout. // // Why one service: clients consume a single typed client per language, // discovery is trivial, and the surface mirrors the GraphQL one users @@ -37,31 +38,31 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Authorizer_Signup_FullMethodName = "/authorizer.v1.Authorizer/Signup" - Authorizer_Login_FullMethodName = "/authorizer.v1.Authorizer/Login" - Authorizer_Logout_FullMethodName = "/authorizer.v1.Authorizer/Logout" - Authorizer_MagicLinkLogin_FullMethodName = "/authorizer.v1.Authorizer/MagicLinkLogin" - Authorizer_VerifyEmail_FullMethodName = "/authorizer.v1.Authorizer/VerifyEmail" - Authorizer_ResendVerifyEmail_FullMethodName = "/authorizer.v1.Authorizer/ResendVerifyEmail" - Authorizer_VerifyOtp_FullMethodName = "/authorizer.v1.Authorizer/VerifyOtp" - Authorizer_ResendOtp_FullMethodName = "/authorizer.v1.Authorizer/ResendOtp" - Authorizer_ForgotPassword_FullMethodName = "/authorizer.v1.Authorizer/ForgotPassword" - Authorizer_ResetPassword_FullMethodName = "/authorizer.v1.Authorizer/ResetPassword" - Authorizer_Profile_FullMethodName = "/authorizer.v1.Authorizer/Profile" - Authorizer_UpdateProfile_FullMethodName = "/authorizer.v1.Authorizer/UpdateProfile" - Authorizer_DeactivateAccount_FullMethodName = "/authorizer.v1.Authorizer/DeactivateAccount" - Authorizer_Revoke_FullMethodName = "/authorizer.v1.Authorizer/Revoke" - Authorizer_Session_FullMethodName = "/authorizer.v1.Authorizer/Session" - Authorizer_ValidateJwtToken_FullMethodName = "/authorizer.v1.Authorizer/ValidateJwtToken" - Authorizer_ValidateSession_FullMethodName = "/authorizer.v1.Authorizer/ValidateSession" - Authorizer_Meta_FullMethodName = "/authorizer.v1.Authorizer/Meta" - Authorizer_Permissions_FullMethodName = "/authorizer.v1.Authorizer/Permissions" + AuthorizerService_Signup_FullMethodName = "/authorizer.v1.AuthorizerService/Signup" + AuthorizerService_Login_FullMethodName = "/authorizer.v1.AuthorizerService/Login" + AuthorizerService_Logout_FullMethodName = "/authorizer.v1.AuthorizerService/Logout" + AuthorizerService_MagicLinkLogin_FullMethodName = "/authorizer.v1.AuthorizerService/MagicLinkLogin" + AuthorizerService_VerifyEmail_FullMethodName = "/authorizer.v1.AuthorizerService/VerifyEmail" + AuthorizerService_ResendVerifyEmail_FullMethodName = "/authorizer.v1.AuthorizerService/ResendVerifyEmail" + AuthorizerService_VerifyOtp_FullMethodName = "/authorizer.v1.AuthorizerService/VerifyOtp" + AuthorizerService_ResendOtp_FullMethodName = "/authorizer.v1.AuthorizerService/ResendOtp" + AuthorizerService_ForgotPassword_FullMethodName = "/authorizer.v1.AuthorizerService/ForgotPassword" + AuthorizerService_ResetPassword_FullMethodName = "/authorizer.v1.AuthorizerService/ResetPassword" + AuthorizerService_Profile_FullMethodName = "/authorizer.v1.AuthorizerService/Profile" + AuthorizerService_UpdateProfile_FullMethodName = "/authorizer.v1.AuthorizerService/UpdateProfile" + AuthorizerService_DeactivateAccount_FullMethodName = "/authorizer.v1.AuthorizerService/DeactivateAccount" + AuthorizerService_Revoke_FullMethodName = "/authorizer.v1.AuthorizerService/Revoke" + AuthorizerService_Session_FullMethodName = "/authorizer.v1.AuthorizerService/Session" + AuthorizerService_ValidateJwtToken_FullMethodName = "/authorizer.v1.AuthorizerService/ValidateJwtToken" + AuthorizerService_ValidateSession_FullMethodName = "/authorizer.v1.AuthorizerService/ValidateSession" + AuthorizerService_Meta_FullMethodName = "/authorizer.v1.AuthorizerService/Meta" + AuthorizerService_Permissions_FullMethodName = "/authorizer.v1.AuthorizerService/Permissions" ) -// AuthorizerClient is the client API for Authorizer service. +// AuthorizerServiceClient is the client API for AuthorizerService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type AuthorizerClient interface { +type AuthorizerServiceClient interface { // Signup registers a new user. Public; requires sign-up enabled in config. // Returns AuthResponse with tokens + (browser callers) Set-Cookie headers. Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error) @@ -97,208 +98,208 @@ type AuthorizerClient interface { Permissions(ctx context.Context, in *PermissionsRequest, opts ...grpc.CallOption) (*PermissionsResponse, error) } -type authorizerClient struct { +type authorizerServiceClient struct { cc grpc.ClientConnInterface } -func NewAuthorizerClient(cc grpc.ClientConnInterface) AuthorizerClient { - return &authorizerClient{cc} +func NewAuthorizerServiceClient(cc grpc.ClientConnInterface) AuthorizerServiceClient { + return &authorizerServiceClient{cc} } -func (c *authorizerClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error) { +func (c *authorizerServiceClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SignupResponse) - err := c.cc.Invoke(ctx, Authorizer_Signup_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_Signup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) { +func (c *authorizerServiceClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LoginResponse) - err := c.cc.Invoke(ctx, Authorizer_Login_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_Login_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) { +func (c *authorizerServiceClient) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LogoutResponse) - err := c.cc.Invoke(ctx, Authorizer_Logout_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_Logout_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) MagicLinkLogin(ctx context.Context, in *MagicLinkLoginRequest, opts ...grpc.CallOption) (*MagicLinkLoginResponse, error) { +func (c *authorizerServiceClient) MagicLinkLogin(ctx context.Context, in *MagicLinkLoginRequest, opts ...grpc.CallOption) (*MagicLinkLoginResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MagicLinkLoginResponse) - err := c.cc.Invoke(ctx, Authorizer_MagicLinkLogin_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_MagicLinkLogin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) VerifyEmail(ctx context.Context, in *VerifyEmailRequest, opts ...grpc.CallOption) (*VerifyEmailResponse, error) { +func (c *authorizerServiceClient) VerifyEmail(ctx context.Context, in *VerifyEmailRequest, opts ...grpc.CallOption) (*VerifyEmailResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(VerifyEmailResponse) - err := c.cc.Invoke(ctx, Authorizer_VerifyEmail_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_VerifyEmail_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) ResendVerifyEmail(ctx context.Context, in *ResendVerifyEmailRequest, opts ...grpc.CallOption) (*ResendVerifyEmailResponse, error) { +func (c *authorizerServiceClient) ResendVerifyEmail(ctx context.Context, in *ResendVerifyEmailRequest, opts ...grpc.CallOption) (*ResendVerifyEmailResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ResendVerifyEmailResponse) - err := c.cc.Invoke(ctx, Authorizer_ResendVerifyEmail_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_ResendVerifyEmail_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) VerifyOtp(ctx context.Context, in *VerifyOtpRequest, opts ...grpc.CallOption) (*VerifyOtpResponse, error) { +func (c *authorizerServiceClient) VerifyOtp(ctx context.Context, in *VerifyOtpRequest, opts ...grpc.CallOption) (*VerifyOtpResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(VerifyOtpResponse) - err := c.cc.Invoke(ctx, Authorizer_VerifyOtp_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_VerifyOtp_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) ResendOtp(ctx context.Context, in *ResendOtpRequest, opts ...grpc.CallOption) (*ResendOtpResponse, error) { +func (c *authorizerServiceClient) ResendOtp(ctx context.Context, in *ResendOtpRequest, opts ...grpc.CallOption) (*ResendOtpResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ResendOtpResponse) - err := c.cc.Invoke(ctx, Authorizer_ResendOtp_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_ResendOtp_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) ForgotPassword(ctx context.Context, in *ForgotPasswordRequest, opts ...grpc.CallOption) (*ForgotPasswordResponse, error) { +func (c *authorizerServiceClient) ForgotPassword(ctx context.Context, in *ForgotPasswordRequest, opts ...grpc.CallOption) (*ForgotPasswordResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ForgotPasswordResponse) - err := c.cc.Invoke(ctx, Authorizer_ForgotPassword_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_ForgotPassword_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error) { +func (c *authorizerServiceClient) ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ResetPasswordResponse) - err := c.cc.Invoke(ctx, Authorizer_ResetPassword_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_ResetPassword_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) Profile(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (*ProfileResponse, error) { +func (c *authorizerServiceClient) Profile(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (*ProfileResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ProfileResponse) - err := c.cc.Invoke(ctx, Authorizer_Profile_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_Profile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*UpdateProfileResponse, error) { +func (c *authorizerServiceClient) UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*UpdateProfileResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateProfileResponse) - err := c.cc.Invoke(ctx, Authorizer_UpdateProfile_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_UpdateProfile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) DeactivateAccount(ctx context.Context, in *DeactivateAccountRequest, opts ...grpc.CallOption) (*DeactivateAccountResponse, error) { +func (c *authorizerServiceClient) DeactivateAccount(ctx context.Context, in *DeactivateAccountRequest, opts ...grpc.CallOption) (*DeactivateAccountResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeactivateAccountResponse) - err := c.cc.Invoke(ctx, Authorizer_DeactivateAccount_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_DeactivateAccount_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) Revoke(ctx context.Context, in *RevokeRequest, opts ...grpc.CallOption) (*RevokeResponse, error) { +func (c *authorizerServiceClient) Revoke(ctx context.Context, in *RevokeRequest, opts ...grpc.CallOption) (*RevokeResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RevokeResponse) - err := c.cc.Invoke(ctx, Authorizer_Revoke_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_Revoke_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) Session(ctx context.Context, in *SessionRequest, opts ...grpc.CallOption) (*SessionResponse, error) { +func (c *authorizerServiceClient) Session(ctx context.Context, in *SessionRequest, opts ...grpc.CallOption) (*SessionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SessionResponse) - err := c.cc.Invoke(ctx, Authorizer_Session_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_Session_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) ValidateJwtToken(ctx context.Context, in *ValidateJwtTokenRequest, opts ...grpc.CallOption) (*ValidateJwtTokenResponse, error) { +func (c *authorizerServiceClient) ValidateJwtToken(ctx context.Context, in *ValidateJwtTokenRequest, opts ...grpc.CallOption) (*ValidateJwtTokenResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ValidateJwtTokenResponse) - err := c.cc.Invoke(ctx, Authorizer_ValidateJwtToken_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_ValidateJwtToken_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) ValidateSession(ctx context.Context, in *ValidateSessionRequest, opts ...grpc.CallOption) (*ValidateSessionResponse, error) { +func (c *authorizerServiceClient) ValidateSession(ctx context.Context, in *ValidateSessionRequest, opts ...grpc.CallOption) (*ValidateSessionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ValidateSessionResponse) - err := c.cc.Invoke(ctx, Authorizer_ValidateSession_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_ValidateSession_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) Meta(ctx context.Context, in *MetaRequest, opts ...grpc.CallOption) (*MetaResponse, error) { +func (c *authorizerServiceClient) Meta(ctx context.Context, in *MetaRequest, opts ...grpc.CallOption) (*MetaResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MetaResponse) - err := c.cc.Invoke(ctx, Authorizer_Meta_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_Meta_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *authorizerClient) Permissions(ctx context.Context, in *PermissionsRequest, opts ...grpc.CallOption) (*PermissionsResponse, error) { +func (c *authorizerServiceClient) Permissions(ctx context.Context, in *PermissionsRequest, opts ...grpc.CallOption) (*PermissionsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PermissionsResponse) - err := c.cc.Invoke(ctx, Authorizer_Permissions_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AuthorizerService_Permissions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -// AuthorizerServer is the server API for Authorizer service. -// All implementations should embed UnimplementedAuthorizerServer +// AuthorizerServiceServer is the server API for AuthorizerService service. +// All implementations should embed UnimplementedAuthorizerServiceServer // for forward compatibility. -type AuthorizerServer interface { +type AuthorizerServiceServer interface { // Signup registers a new user. Public; requires sign-up enabled in config. // Returns AuthResponse with tokens + (browser callers) Set-Cookie headers. Signup(context.Context, *SignupRequest) (*SignupResponse, error) @@ -334,514 +335,514 @@ type AuthorizerServer interface { Permissions(context.Context, *PermissionsRequest) (*PermissionsResponse, error) } -// UnimplementedAuthorizerServer should be embedded to have +// UnimplementedAuthorizerServiceServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. -type UnimplementedAuthorizerServer struct{} +type UnimplementedAuthorizerServiceServer struct{} -func (UnimplementedAuthorizerServer) Signup(context.Context, *SignupRequest) (*SignupResponse, error) { +func (UnimplementedAuthorizerServiceServer) Signup(context.Context, *SignupRequest) (*SignupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Signup not implemented") } -func (UnimplementedAuthorizerServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) { +func (UnimplementedAuthorizerServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Login not implemented") } -func (UnimplementedAuthorizerServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) { +func (UnimplementedAuthorizerServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Logout not implemented") } -func (UnimplementedAuthorizerServer) MagicLinkLogin(context.Context, *MagicLinkLoginRequest) (*MagicLinkLoginResponse, error) { +func (UnimplementedAuthorizerServiceServer) MagicLinkLogin(context.Context, *MagicLinkLoginRequest) (*MagicLinkLoginResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MagicLinkLogin not implemented") } -func (UnimplementedAuthorizerServer) VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error) { +func (UnimplementedAuthorizerServiceServer) VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VerifyEmail not implemented") } -func (UnimplementedAuthorizerServer) ResendVerifyEmail(context.Context, *ResendVerifyEmailRequest) (*ResendVerifyEmailResponse, error) { +func (UnimplementedAuthorizerServiceServer) ResendVerifyEmail(context.Context, *ResendVerifyEmailRequest) (*ResendVerifyEmailResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ResendVerifyEmail not implemented") } -func (UnimplementedAuthorizerServer) VerifyOtp(context.Context, *VerifyOtpRequest) (*VerifyOtpResponse, error) { +func (UnimplementedAuthorizerServiceServer) VerifyOtp(context.Context, *VerifyOtpRequest) (*VerifyOtpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VerifyOtp not implemented") } -func (UnimplementedAuthorizerServer) ResendOtp(context.Context, *ResendOtpRequest) (*ResendOtpResponse, error) { +func (UnimplementedAuthorizerServiceServer) ResendOtp(context.Context, *ResendOtpRequest) (*ResendOtpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ResendOtp not implemented") } -func (UnimplementedAuthorizerServer) ForgotPassword(context.Context, *ForgotPasswordRequest) (*ForgotPasswordResponse, error) { +func (UnimplementedAuthorizerServiceServer) ForgotPassword(context.Context, *ForgotPasswordRequest) (*ForgotPasswordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ForgotPassword not implemented") } -func (UnimplementedAuthorizerServer) ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error) { +func (UnimplementedAuthorizerServiceServer) ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ResetPassword not implemented") } -func (UnimplementedAuthorizerServer) Profile(context.Context, *ProfileRequest) (*ProfileResponse, error) { +func (UnimplementedAuthorizerServiceServer) Profile(context.Context, *ProfileRequest) (*ProfileResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Profile not implemented") } -func (UnimplementedAuthorizerServer) UpdateProfile(context.Context, *UpdateProfileRequest) (*UpdateProfileResponse, error) { +func (UnimplementedAuthorizerServiceServer) UpdateProfile(context.Context, *UpdateProfileRequest) (*UpdateProfileResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateProfile not implemented") } -func (UnimplementedAuthorizerServer) DeactivateAccount(context.Context, *DeactivateAccountRequest) (*DeactivateAccountResponse, error) { +func (UnimplementedAuthorizerServiceServer) DeactivateAccount(context.Context, *DeactivateAccountRequest) (*DeactivateAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeactivateAccount not implemented") } -func (UnimplementedAuthorizerServer) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error) { +func (UnimplementedAuthorizerServiceServer) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") } -func (UnimplementedAuthorizerServer) Session(context.Context, *SessionRequest) (*SessionResponse, error) { +func (UnimplementedAuthorizerServiceServer) Session(context.Context, *SessionRequest) (*SessionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Session not implemented") } -func (UnimplementedAuthorizerServer) ValidateJwtToken(context.Context, *ValidateJwtTokenRequest) (*ValidateJwtTokenResponse, error) { +func (UnimplementedAuthorizerServiceServer) ValidateJwtToken(context.Context, *ValidateJwtTokenRequest) (*ValidateJwtTokenResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidateJwtToken not implemented") } -func (UnimplementedAuthorizerServer) ValidateSession(context.Context, *ValidateSessionRequest) (*ValidateSessionResponse, error) { +func (UnimplementedAuthorizerServiceServer) ValidateSession(context.Context, *ValidateSessionRequest) (*ValidateSessionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidateSession not implemented") } -func (UnimplementedAuthorizerServer) Meta(context.Context, *MetaRequest) (*MetaResponse, error) { +func (UnimplementedAuthorizerServiceServer) Meta(context.Context, *MetaRequest) (*MetaResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Meta not implemented") } -func (UnimplementedAuthorizerServer) Permissions(context.Context, *PermissionsRequest) (*PermissionsResponse, error) { +func (UnimplementedAuthorizerServiceServer) Permissions(context.Context, *PermissionsRequest) (*PermissionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Permissions not implemented") } -func (UnimplementedAuthorizerServer) testEmbeddedByValue() {} +func (UnimplementedAuthorizerServiceServer) testEmbeddedByValue() {} -// UnsafeAuthorizerServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AuthorizerServer will +// UnsafeAuthorizerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AuthorizerServiceServer will // result in compilation errors. -type UnsafeAuthorizerServer interface { - mustEmbedUnimplementedAuthorizerServer() +type UnsafeAuthorizerServiceServer interface { + mustEmbedUnimplementedAuthorizerServiceServer() } -func RegisterAuthorizerServer(s grpc.ServiceRegistrar, srv AuthorizerServer) { - // If the following call pancis, it indicates UnimplementedAuthorizerServer was +func RegisterAuthorizerServiceServer(s grpc.ServiceRegistrar, srv AuthorizerServiceServer) { + // If the following call pancis, it indicates UnimplementedAuthorizerServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } - s.RegisterService(&Authorizer_ServiceDesc, srv) + s.RegisterService(&AuthorizerService_ServiceDesc, srv) } -func _Authorizer_Signup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_Signup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SignupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).Signup(ctx, in) + return srv.(AuthorizerServiceServer).Signup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_Signup_FullMethodName, + FullMethod: AuthorizerService_Signup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).Signup(ctx, req.(*SignupRequest)) + return srv.(AuthorizerServiceServer).Signup(ctx, req.(*SignupRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LoginRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).Login(ctx, in) + return srv.(AuthorizerServiceServer).Login(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_Login_FullMethodName, + FullMethod: AuthorizerService_Login_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).Login(ctx, req.(*LoginRequest)) + return srv.(AuthorizerServiceServer).Login(ctx, req.(*LoginRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LogoutRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).Logout(ctx, in) + return srv.(AuthorizerServiceServer).Logout(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_Logout_FullMethodName, + FullMethod: AuthorizerService_Logout_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).Logout(ctx, req.(*LogoutRequest)) + return srv.(AuthorizerServiceServer).Logout(ctx, req.(*LogoutRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_MagicLinkLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_MagicLinkLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MagicLinkLoginRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).MagicLinkLogin(ctx, in) + return srv.(AuthorizerServiceServer).MagicLinkLogin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_MagicLinkLogin_FullMethodName, + FullMethod: AuthorizerService_MagicLinkLogin_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).MagicLinkLogin(ctx, req.(*MagicLinkLoginRequest)) + return srv.(AuthorizerServiceServer).MagicLinkLogin(ctx, req.(*MagicLinkLoginRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_VerifyEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_VerifyEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(VerifyEmailRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).VerifyEmail(ctx, in) + return srv.(AuthorizerServiceServer).VerifyEmail(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_VerifyEmail_FullMethodName, + FullMethod: AuthorizerService_VerifyEmail_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).VerifyEmail(ctx, req.(*VerifyEmailRequest)) + return srv.(AuthorizerServiceServer).VerifyEmail(ctx, req.(*VerifyEmailRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_ResendVerifyEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_ResendVerifyEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ResendVerifyEmailRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).ResendVerifyEmail(ctx, in) + return srv.(AuthorizerServiceServer).ResendVerifyEmail(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_ResendVerifyEmail_FullMethodName, + FullMethod: AuthorizerService_ResendVerifyEmail_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).ResendVerifyEmail(ctx, req.(*ResendVerifyEmailRequest)) + return srv.(AuthorizerServiceServer).ResendVerifyEmail(ctx, req.(*ResendVerifyEmailRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_VerifyOtp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_VerifyOtp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(VerifyOtpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).VerifyOtp(ctx, in) + return srv.(AuthorizerServiceServer).VerifyOtp(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_VerifyOtp_FullMethodName, + FullMethod: AuthorizerService_VerifyOtp_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).VerifyOtp(ctx, req.(*VerifyOtpRequest)) + return srv.(AuthorizerServiceServer).VerifyOtp(ctx, req.(*VerifyOtpRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_ResendOtp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_ResendOtp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ResendOtpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).ResendOtp(ctx, in) + return srv.(AuthorizerServiceServer).ResendOtp(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_ResendOtp_FullMethodName, + FullMethod: AuthorizerService_ResendOtp_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).ResendOtp(ctx, req.(*ResendOtpRequest)) + return srv.(AuthorizerServiceServer).ResendOtp(ctx, req.(*ResendOtpRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_ForgotPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_ForgotPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ForgotPasswordRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).ForgotPassword(ctx, in) + return srv.(AuthorizerServiceServer).ForgotPassword(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_ForgotPassword_FullMethodName, + FullMethod: AuthorizerService_ForgotPassword_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).ForgotPassword(ctx, req.(*ForgotPasswordRequest)) + return srv.(AuthorizerServiceServer).ForgotPassword(ctx, req.(*ForgotPasswordRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_ResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_ResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ResetPasswordRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).ResetPassword(ctx, in) + return srv.(AuthorizerServiceServer).ResetPassword(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_ResetPassword_FullMethodName, + FullMethod: AuthorizerService_ResetPassword_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).ResetPassword(ctx, req.(*ResetPasswordRequest)) + return srv.(AuthorizerServiceServer).ResetPassword(ctx, req.(*ResetPasswordRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_Profile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_Profile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ProfileRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).Profile(ctx, in) + return srv.(AuthorizerServiceServer).Profile(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_Profile_FullMethodName, + FullMethod: AuthorizerService_Profile_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).Profile(ctx, req.(*ProfileRequest)) + return srv.(AuthorizerServiceServer).Profile(ctx, req.(*ProfileRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_UpdateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_UpdateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateProfileRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).UpdateProfile(ctx, in) + return srv.(AuthorizerServiceServer).UpdateProfile(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_UpdateProfile_FullMethodName, + FullMethod: AuthorizerService_UpdateProfile_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).UpdateProfile(ctx, req.(*UpdateProfileRequest)) + return srv.(AuthorizerServiceServer).UpdateProfile(ctx, req.(*UpdateProfileRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_DeactivateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_DeactivateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeactivateAccountRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).DeactivateAccount(ctx, in) + return srv.(AuthorizerServiceServer).DeactivateAccount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_DeactivateAccount_FullMethodName, + FullMethod: AuthorizerService_DeactivateAccount_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).DeactivateAccount(ctx, req.(*DeactivateAccountRequest)) + return srv.(AuthorizerServiceServer).DeactivateAccount(ctx, req.(*DeactivateAccountRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RevokeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).Revoke(ctx, in) + return srv.(AuthorizerServiceServer).Revoke(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_Revoke_FullMethodName, + FullMethod: AuthorizerService_Revoke_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).Revoke(ctx, req.(*RevokeRequest)) + return srv.(AuthorizerServiceServer).Revoke(ctx, req.(*RevokeRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_Session_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_Session_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SessionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).Session(ctx, in) + return srv.(AuthorizerServiceServer).Session(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_Session_FullMethodName, + FullMethod: AuthorizerService_Session_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).Session(ctx, req.(*SessionRequest)) + return srv.(AuthorizerServiceServer).Session(ctx, req.(*SessionRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_ValidateJwtToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_ValidateJwtToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ValidateJwtTokenRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).ValidateJwtToken(ctx, in) + return srv.(AuthorizerServiceServer).ValidateJwtToken(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_ValidateJwtToken_FullMethodName, + FullMethod: AuthorizerService_ValidateJwtToken_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).ValidateJwtToken(ctx, req.(*ValidateJwtTokenRequest)) + return srv.(AuthorizerServiceServer).ValidateJwtToken(ctx, req.(*ValidateJwtTokenRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_ValidateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_ValidateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ValidateSessionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).ValidateSession(ctx, in) + return srv.(AuthorizerServiceServer).ValidateSession(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_ValidateSession_FullMethodName, + FullMethod: AuthorizerService_ValidateSession_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).ValidateSession(ctx, req.(*ValidateSessionRequest)) + return srv.(AuthorizerServiceServer).ValidateSession(ctx, req.(*ValidateSessionRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_Meta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_Meta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MetaRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).Meta(ctx, in) + return srv.(AuthorizerServiceServer).Meta(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_Meta_FullMethodName, + FullMethod: AuthorizerService_Meta_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).Meta(ctx, req.(*MetaRequest)) + return srv.(AuthorizerServiceServer).Meta(ctx, req.(*MetaRequest)) } return interceptor(ctx, in, info, handler) } -func _Authorizer_Permissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AuthorizerService_Permissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PermissionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AuthorizerServer).Permissions(ctx, in) + return srv.(AuthorizerServiceServer).Permissions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Authorizer_Permissions_FullMethodName, + FullMethod: AuthorizerService_Permissions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthorizerServer).Permissions(ctx, req.(*PermissionsRequest)) + return srv.(AuthorizerServiceServer).Permissions(ctx, req.(*PermissionsRequest)) } return interceptor(ctx, in, info, handler) } -// Authorizer_ServiceDesc is the grpc.ServiceDesc for Authorizer service. +// AuthorizerService_ServiceDesc is the grpc.ServiceDesc for AuthorizerService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var Authorizer_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "authorizer.v1.Authorizer", - HandlerType: (*AuthorizerServer)(nil), +var AuthorizerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "authorizer.v1.AuthorizerService", + HandlerType: (*AuthorizerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Signup", - Handler: _Authorizer_Signup_Handler, + Handler: _AuthorizerService_Signup_Handler, }, { MethodName: "Login", - Handler: _Authorizer_Login_Handler, + Handler: _AuthorizerService_Login_Handler, }, { MethodName: "Logout", - Handler: _Authorizer_Logout_Handler, + Handler: _AuthorizerService_Logout_Handler, }, { MethodName: "MagicLinkLogin", - Handler: _Authorizer_MagicLinkLogin_Handler, + Handler: _AuthorizerService_MagicLinkLogin_Handler, }, { MethodName: "VerifyEmail", - Handler: _Authorizer_VerifyEmail_Handler, + Handler: _AuthorizerService_VerifyEmail_Handler, }, { MethodName: "ResendVerifyEmail", - Handler: _Authorizer_ResendVerifyEmail_Handler, + Handler: _AuthorizerService_ResendVerifyEmail_Handler, }, { MethodName: "VerifyOtp", - Handler: _Authorizer_VerifyOtp_Handler, + Handler: _AuthorizerService_VerifyOtp_Handler, }, { MethodName: "ResendOtp", - Handler: _Authorizer_ResendOtp_Handler, + Handler: _AuthorizerService_ResendOtp_Handler, }, { MethodName: "ForgotPassword", - Handler: _Authorizer_ForgotPassword_Handler, + Handler: _AuthorizerService_ForgotPassword_Handler, }, { MethodName: "ResetPassword", - Handler: _Authorizer_ResetPassword_Handler, + Handler: _AuthorizerService_ResetPassword_Handler, }, { MethodName: "Profile", - Handler: _Authorizer_Profile_Handler, + Handler: _AuthorizerService_Profile_Handler, }, { MethodName: "UpdateProfile", - Handler: _Authorizer_UpdateProfile_Handler, + Handler: _AuthorizerService_UpdateProfile_Handler, }, { MethodName: "DeactivateAccount", - Handler: _Authorizer_DeactivateAccount_Handler, + Handler: _AuthorizerService_DeactivateAccount_Handler, }, { MethodName: "Revoke", - Handler: _Authorizer_Revoke_Handler, + Handler: _AuthorizerService_Revoke_Handler, }, { MethodName: "Session", - Handler: _Authorizer_Session_Handler, + Handler: _AuthorizerService_Session_Handler, }, { MethodName: "ValidateJwtToken", - Handler: _Authorizer_ValidateJwtToken_Handler, + Handler: _AuthorizerService_ValidateJwtToken_Handler, }, { MethodName: "ValidateSession", - Handler: _Authorizer_ValidateSession_Handler, + Handler: _AuthorizerService_ValidateSession_Handler, }, { MethodName: "Meta", - Handler: _Authorizer_Meta_Handler, + Handler: _AuthorizerService_Meta_Handler, }, { MethodName: "Permissions", - Handler: _Authorizer_Permissions_Handler, + Handler: _AuthorizerService_Permissions_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/gen/openapi/authorizer.swagger.json b/gen/openapi/authorizer.swagger.json index ce3e3444..94c00861 100644 --- a/gen/openapi/authorizer.swagger.json +++ b/gen/openapi/authorizer.swagger.json @@ -6,7 +6,7 @@ }, "tags": [ { - "name": "Authorizer" + "name": "AuthorizerService" } ], "consumes": [ @@ -19,7 +19,7 @@ "/v1/deactivate_account": { "post": { "summary": "DeactivateAccount soft-deletes the caller's account and revokes all\nrefresh tokens as a side effect. OAuth has no concept of account\ndeactivation; this is the typed equivalent of SCIM PATCH active=false.", - "operationId": "Authorizer_DeactivateAccount", + "operationId": "AuthorizerService_DeactivateAccount", "responses": { "200": { "description": "A successful response.", @@ -45,13 +45,13 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/forgot_password": { "post": { - "operationId": "Authorizer_ForgotPassword", + "operationId": "AuthorizerService_ForgotPassword", "responses": { "200": { "description": "A successful response.", @@ -77,14 +77,14 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/login": { "post": { "summary": "Login authenticates with email/phone + password.", - "operationId": "Authorizer_Login", + "operationId": "AuthorizerService_Login", "responses": { "200": { "description": "A successful response.", @@ -110,14 +110,14 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/logout": { "get": { "summary": "Logout ends the caller's current session.", - "operationId": "Authorizer_Logout", + "operationId": "AuthorizerService_Logout", "responses": { "200": { "description": "A successful response.", @@ -133,14 +133,14 @@ } }, "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/magic_link_login": { "post": { "summary": "MagicLinkLogin dispatches a passwordless email link. The clicked link\nhits the existing /verify_email browser handler.", - "operationId": "Authorizer_MagicLinkLogin", + "operationId": "AuthorizerService_MagicLinkLogin", "responses": { "200": { "description": "A successful response.", @@ -166,14 +166,14 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/meta": { "get": { "summary": "Meta returns server feature flags. No auth required.", - "operationId": "Authorizer_Meta", + "operationId": "AuthorizerService_Meta", "responses": { "200": { "description": "A successful response.", @@ -189,14 +189,14 @@ } }, "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/permissions": { "get": { "summary": "Permissions returns the caller's effective (resource, scope) pairs.", - "operationId": "Authorizer_Permissions", + "operationId": "AuthorizerService_Permissions", "responses": { "200": { "description": "A successful response.", @@ -212,14 +212,14 @@ } }, "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/profile": { "get": { "summary": "Profile returns the authenticated user.", - "operationId": "Authorizer_Profile", + "operationId": "AuthorizerService_Profile", "responses": { "200": { "description": "A successful response.", @@ -235,13 +235,13 @@ } }, "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/resend_otp": { "post": { - "operationId": "Authorizer_ResendOtp", + "operationId": "AuthorizerService_ResendOtp", "responses": { "200": { "description": "A successful response.", @@ -267,13 +267,13 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/resend_verify_email": { "post": { - "operationId": "Authorizer_ResendVerifyEmail", + "operationId": "AuthorizerService_ResendVerifyEmail", "responses": { "200": { "description": "A successful response.", @@ -299,13 +299,13 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/reset_password": { "post": { - "operationId": "Authorizer_ResetPassword", + "operationId": "AuthorizerService_ResetPassword", "responses": { "200": { "description": "A successful response.", @@ -331,14 +331,14 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/revoke": { "post": { "summary": "Revoke invalidates a refresh token. Typed mirror of RFC 7009.", - "operationId": "Authorizer_Revoke", + "operationId": "AuthorizerService_Revoke", "responses": { "200": { "description": "A successful response.", @@ -364,14 +364,14 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/session": { "post": { "summary": "Session returns the AuthResponse bound to the caller's cookie/bearer.", - "operationId": "Authorizer_Session", + "operationId": "AuthorizerService_Session", "responses": { "200": { "description": "A successful response.", @@ -397,14 +397,14 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/signup": { "post": { "summary": "Signup registers a new user. Public; requires sign-up enabled in config.\nReturns AuthResponse with tokens + (browser callers) Set-Cookie headers.", - "operationId": "Authorizer_Signup", + "operationId": "AuthorizerService_Signup", "responses": { "200": { "description": "A successful response.", @@ -430,13 +430,13 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/update_profile": { "post": { - "operationId": "Authorizer_UpdateProfile", + "operationId": "AuthorizerService_UpdateProfile", "responses": { "200": { "description": "A successful response.", @@ -462,13 +462,13 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/validate_jwt_token": { "post": { - "operationId": "Authorizer_ValidateJwtToken", + "operationId": "AuthorizerService_ValidateJwtToken", "responses": { "200": { "description": "A successful response.", @@ -494,13 +494,13 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/validate_session": { "post": { - "operationId": "Authorizer_ValidateSession", + "operationId": "AuthorizerService_ValidateSession", "responses": { "200": { "description": "A successful response.", @@ -526,13 +526,13 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/verify_email": { "post": { - "operationId": "Authorizer_VerifyEmail", + "operationId": "AuthorizerService_VerifyEmail", "responses": { "200": { "description": "A successful response.", @@ -558,13 +558,13 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } }, "/v1/verify_otp": { "post": { - "operationId": "Authorizer_VerifyOtp", + "operationId": "AuthorizerService_VerifyOtp", "responses": { "200": { "description": "A successful response.", @@ -590,7 +590,7 @@ } ], "tags": [ - "Authorizer" + "AuthorizerService" ] } } diff --git a/internal/gateway/mount.go b/internal/gateway/mount.go index 6a163f1a..940ee9c0 100644 --- a/internal/gateway/mount.go +++ b/internal/gateway/mount.go @@ -78,7 +78,7 @@ func Handler(ctx context.Context, grpcSrv *grpc.Server) (http.Handler, func(), e } func registerAll(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - // Single Authorizer service. As more services land (admin-side ones + // Single AuthorizerService. As more services land (admin-side ones // that today stay GraphQL-only), add their registrar here. - return authorizerv1.RegisterAuthorizerHandler(ctx, mux, conn) + return authorizerv1.RegisterAuthorizerServiceHandler(ctx, mux, conn) } diff --git a/internal/grpcsrv/handlers/authorizer.go b/internal/grpcsrv/handlers/authorizer.go index d570e1f6..dc95d9ed 100644 --- a/internal/grpcsrv/handlers/authorizer.go +++ b/internal/grpcsrv/handlers/authorizer.go @@ -19,10 +19,12 @@ import ( authorizerv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/v1" ) -// AuthorizerHandler implements authorizer.v1.Authorizer. The single struct -// satisfies the entire service interface; methods become real one at a time. +// AuthorizerHandler implements authorizer.v1.AuthorizerService. The single +// struct satisfies the entire service interface; methods become real one at +// a time. The Go type name stays "AuthorizerHandler" (not "...ServiceHandler") +// because in Go we don't repeat the "Service" suffix at the call site. type AuthorizerHandler struct { - authorizerv1.UnimplementedAuthorizerServer + authorizerv1.UnimplementedAuthorizerServiceServer Service service.Provider } diff --git a/internal/grpcsrv/server.go b/internal/grpcsrv/server.go index c65826a6..8d33a68b 100644 --- a/internal/grpcsrv/server.go +++ b/internal/grpcsrv/server.go @@ -53,11 +53,11 @@ func New(addr string, deps *Dependencies) (*Server, error) { ), ) - // Register the single Authorizer service. AuthorizerHandler embeds - // UnimplementedAuthorizerServer, so any RPC whose method has not yet - // been migrated returns codes.Unimplemented. Migrated methods (today: - // Meta) override the unimplemented stubs. - authorizerv1.RegisterAuthorizerServer(srv, &handlers.AuthorizerHandler{Service: deps.ServiceProvider}) + // Register the single AuthorizerService. AuthorizerHandler embeds + // UnimplementedAuthorizerServiceServer, so any RPC whose method has + // not yet been migrated returns codes.Unimplemented. Migrated methods + // (today: Meta) override the unimplemented stubs. + authorizerv1.RegisterAuthorizerServiceServer(srv, &handlers.AuthorizerHandler{Service: deps.ServiceProvider}) // gRPC health checking protocol (used by k8s grpc-probe and similar). hs := health.NewServer() diff --git a/internal/integration_tests/grpc_meta_test.go b/internal/integration_tests/grpc_meta_test.go index 787c8cc5..56bb5605 100644 --- a/internal/integration_tests/grpc_meta_test.go +++ b/internal/integration_tests/grpc_meta_test.go @@ -17,7 +17,7 @@ import ( authorizerv1 "github.com/authorizerdev/authorizer/gen/go/authorizer/v1" ) -// TestGRPCMeta exercises Authorizer.Meta end-to-end over a bufconn +// TestGRPCMeta exercises AuthorizerService.Meta end-to-end over a bufconn // in-process gRPC channel. Validates the consolidated single-service // design: proto → handler → service.Meta → response projection. func TestGRPCMeta(t *testing.T) { @@ -49,7 +49,7 @@ func TestGRPCMeta(t *testing.T) { require.NoError(t, err) t.Cleanup(func() { _ = conn.Close() }) - client := authorizerv1.NewAuthorizerClient(conn) + client := authorizerv1.NewAuthorizerServiceClient(conn) resp, err := client.Meta(context.Background(), &authorizerv1.MetaRequest{}) require.NoError(t, err) require.NotNil(t, resp.Meta) diff --git a/internal/integration_tests/grpc_surface_test.go b/internal/integration_tests/grpc_surface_test.go index 4e46eeec..fb39b701 100644 --- a/internal/integration_tests/grpc_surface_test.go +++ b/internal/integration_tests/grpc_surface_test.go @@ -50,16 +50,16 @@ func bootGRPCBufconn(t *testing.T) *grpc.ClientConn { return conn } -// TestAuthorizerStubsReturnUnimplemented locks down the contract for every -// not-yet-migrated method on the consolidated Authorizer service. Today -// Meta is the only real implementation; the remaining 18 methods return -// codes.Unimplemented. As each one gets migrated out of internal/graphql -// into internal/service, the corresponding sub-test here will start -// returning OK and the case can be moved to a happy-path test. -func TestAuthorizerStubsReturnUnimplemented(t *testing.T) { +// TestAuthorizerServiceStubsReturnUnimplemented locks down the contract for +// every not-yet-migrated method on the consolidated AuthorizerService. +// Today Meta is the only real implementation; the remaining 18 methods +// return codes.Unimplemented. As each one gets migrated out of +// internal/graphql into internal/service, the corresponding sub-test here +// will start returning OK and the case can be moved to a happy-path test. +func TestAuthorizerServiceStubsReturnUnimplemented(t *testing.T) { conn := bootGRPCBufconn(t) ctx := context.Background() - c := authorizerv1.NewAuthorizerClient(conn) + c := authorizerv1.NewAuthorizerServiceClient(conn) type call func(context.Context) error cases := map[string]call{ @@ -144,7 +144,7 @@ func TestAuthorizerStubsReturnUnimplemented(t *testing.T) { st, ok := status.FromError(err) require.True(t, ok) assert.Equal(t, codes.Unimplemented, st.Code(), - "stub for Authorizer.%s should return Unimplemented until its handler is wired", name) + "stub for AuthorizerService.%s should return Unimplemented until its handler is wired", name) }) } } diff --git a/internal/integration_tests/mcp_stubs_test.go b/internal/integration_tests/mcp_stubs_test.go index 233322c0..3105d608 100644 --- a/internal/integration_tests/mcp_stubs_test.go +++ b/internal/integration_tests/mcp_stubs_test.go @@ -45,7 +45,7 @@ func TestMCPStubReturnsError(t *testing.T) { defer clientSession.Close() // permissions is exposed via the proto annotation but its - // Authorizer.Permissions handler is a stub returning codes.Unimplemented. + // AuthorizerService.Permissions handler is a stub returning codes.Unimplemented. // The MCP server must surface this as a CallToolResult{IsError:true} // (tool-level error) rather than a JSON-RPC protocol error — so the // LLM gets actionable text and can react / try a different tool. diff --git a/internal/integration_tests/mcp_test.go b/internal/integration_tests/mcp_test.go index 7d17e098..712fde37 100644 --- a/internal/integration_tests/mcp_test.go +++ b/internal/integration_tests/mcp_test.go @@ -62,8 +62,8 @@ func TestMCPListAndCallMeta(t *testing.T) { require.True(t, gotNames[want], "expected MCP tool %q to be exposed; got %v", want, gotNames) } - // tools/call meta — should invoke Authorizer.Meta and return JSON wrapped - // in the per-RPC MetaResponse shape. + // tools/call meta — should invoke AuthorizerService.Meta and return JSON + // wrapped in the per-RPC MetaResponse shape. call, err := clientSession.CallTool(ctx, &mcp.CallToolParams{ Name: "meta", Arguments: map[string]any{}, diff --git a/internal/integration_tests/rest_meta_test.go b/internal/integration_tests/rest_meta_test.go index 6c6ba1d4..85786d30 100644 --- a/internal/integration_tests/rest_meta_test.go +++ b/internal/integration_tests/rest_meta_test.go @@ -19,10 +19,10 @@ import ( // TestRESTMeta exercises GET /v1/meta through the grpc-gateway. Validates // that the gateway translates the REST call into an in-process gRPC -// invocation against Authorizer.Meta, then renders the response as JSON. -// The wrapped response shape (`{"meta": {...}}`) is intentional: every -// Authorizer RPC's response is a thin wrapper around the inner type so -// buf STANDARD's RPC_REQUEST_RESPONSE_UNIQUE lint is satisfied. +// invocation against AuthorizerService.Meta, then renders the response as +// JSON. The wrapped response shape (`{"meta": {...}}`) is intentional: +// every AuthorizerService RPC's response is a thin wrapper around the +// inner type so buf STANDARD's RPC_REQUEST_RESPONSE_UNIQUE lint is satisfied. func TestRESTMeta(t *testing.T) { cfg := getTestConfig() cfg.ClientID = "test-client" diff --git a/proto/authorizer/v1/authorizer.proto b/proto/authorizer/v1/authorizer.proto index b9bebe24..823245a4 100644 --- a/proto/authorizer/v1/authorizer.proto +++ b/proto/authorizer/v1/authorizer.proto @@ -1,9 +1,10 @@ -// Authorizer is the single gRPC service that exposes Authorizer's public -// API. Method names match the GraphQL operation names 1:1 (snake_case in -// GraphQL → PascalCase in proto): Signup, Login, MagicLinkLogin, VerifyEmail, -// ResendVerifyEmail, ForgotPassword, ResetPassword, VerifyOtp, ResendOtp, -// UpdateProfile, DeactivateAccount, Revoke, Meta, Session, Profile, -// ValidateJwtToken, ValidateSession, Permissions, Logout. +// AuthorizerService is the single gRPC service that exposes Authorizer's +// public API. Method names match the GraphQL operation names 1:1 +// (snake_case in GraphQL → PascalCase in proto): Signup, Login, +// MagicLinkLogin, VerifyEmail, ResendVerifyEmail, ForgotPassword, +// ResetPassword, VerifyOtp, ResendOtp, UpdateProfile, DeactivateAccount, +// Revoke, Meta, Session, Profile, ValidateJwtToken, ValidateSession, +// Permissions, Logout. // // Why one service: clients consume a single typed client per language, // discovery is trivial, and the surface mirrors the GraphQL one users @@ -25,7 +26,7 @@ import "authorizer/common/v1/annotations.proto"; import "authorizer/common/v1/types.proto"; import "authorizer/v1/types.proto"; -service Authorizer { +service AuthorizerService { // === Identity creation & authentication === // Signup registers a new user. Public; requires sign-up enabled in config. diff --git a/proto/buf.yaml b/proto/buf.yaml index 25de19df..ba61d5be 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -10,11 +10,6 @@ lint: - STANDARD except: - PACKAGE_VERSION_SUFFIX - # The single public service is intentionally named "Authorizer" rather - # than "AuthorizerService" — it's THE authorizer, not "one of many - # services." Matches the project name; users see a single typed client - # in every SDK (authorizerv1.AuthorizerClient). - - SERVICE_SUFFIX ignore: [] breaking: use: From 0c67f37d9e7e6007b59b18f723b890d155f3237d Mon Sep 17 00:00:00 2001 From: Lakhan Samani Date: Sat, 30 May 2026 16:03:43 +0530 Subject: [PATCH 3/3] chore(proto): apply buf format; enforce via CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two changes: 1. Ran `buf format -w proto` — sorts imports alphabetically, normalises multi-line validator option blocks, single-space comment trailers. 2. CI: `bufbuild/buf-action@v1` now runs `buf format -d --exit-code` (format: true) so any future drift fails the proto job. `buf lint proto` is clean. The only generated-code change is a 10-line reshuffle in authorizer.pb.go from the import reordering. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 5 ++- gen/go/authorizer/v1/authorizer.pb.go | 20 +++++------ proto/authorizer/common/v1/pagination.proto | 5 ++- proto/authorizer/v1/authorizer.proto | 38 +++++++++++++++------ 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e94640b..82be1a69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,10 @@ jobs: with: input: proto lint: true - format: false + # `format: true` makes the action run `buf format -d --exit-code`, + # failing the job on any unformatted .proto. Catches drift before + # generated code can diverge. + format: true # Only run breaking on PRs (push to main has nothing to diff against). breaking: ${{ github.event_name == 'pull_request' }} breaking_against: 'https://github.com/${{ github.repository }}.git#branch=main,subdir=proto' diff --git a/gen/go/authorizer/v1/authorizer.pb.go b/gen/go/authorizer/v1/authorizer.pb.go index d5fe16e8..2819abef 100644 --- a/gen/go/authorizer/v1/authorizer.pb.go +++ b/gen/go/authorizer/v1/authorizer.pb.go @@ -2238,16 +2238,16 @@ var file_authorizer_v1_authorizer_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, - 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, - 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x26, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x04, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0xc0, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, diff --git a/proto/authorizer/common/v1/pagination.proto b/proto/authorizer/common/v1/pagination.proto index 5d2c06ef..96c4f7bf 100644 --- a/proto/authorizer/common/v1/pagination.proto +++ b/proto/authorizer/common/v1/pagination.proto @@ -16,7 +16,10 @@ message PaginationRequest { int64 page = 1 [(buf.validate.field).int64 = {gte: 0}]; // Page size. Server enforces an upper bound (typically 100). Default 10. - int64 limit = 2 [(buf.validate.field).int64 = {gte: 0, lte: 1000}]; + int64 limit = 2 [(buf.validate.field).int64 = { + gte: 0 + lte: 1000 + }]; // Opaque cursor returned by the previous List call's `next_page_token`. // Preferred for new clients (AIP-158). When set, `page` is ignored. diff --git a/proto/authorizer/v1/authorizer.proto b/proto/authorizer/v1/authorizer.proto index 823245a4..e6301f62 100644 --- a/proto/authorizer/v1/authorizer.proto +++ b/proto/authorizer/v1/authorizer.proto @@ -20,11 +20,11 @@ syntax = "proto3"; package authorizer.v1; -import "buf/validate/validate.proto"; -import "google/api/annotations.proto"; import "authorizer/common/v1/annotations.proto"; import "authorizer/common/v1/types.proto"; import "authorizer/v1/types.proto"; +import "buf/validate/validate.proto"; +import "google/api/annotations.proto"; service AuthorizerService { // === Identity creation & authentication === @@ -38,7 +38,7 @@ service AuthorizerService { }; option (authorizer.common.v1.public) = true; option (authorizer.common.v1.audit_log) = true; - option (authorizer.common.v1.mcp_tool) = {exposed: false}; // creds + option (authorizer.common.v1.mcp_tool) = {exposed: false}; // creds } // Login authenticates with email/phone + password. @@ -49,7 +49,7 @@ service AuthorizerService { }; option (authorizer.common.v1.public) = true; option (authorizer.common.v1.audit_log) = true; - option (authorizer.common.v1.mcp_tool) = {exposed: false}; // creds + option (authorizer.common.v1.mcp_tool) = {exposed: false}; // creds } // Logout ends the caller's current session. @@ -220,8 +220,14 @@ service AuthorizerService { message SignupRequest { string email = 1 [(buf.validate.field).string = {max_len: 320}]; string phone_number = 2 [(buf.validate.field).string.max_len = 32]; - string password = 3 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; - string confirm_password = 4 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; + string password = 3 [(buf.validate.field).string = { + min_len: 1 + max_len: 128 + }]; + string confirm_password = 4 [(buf.validate.field).string = { + min_len: 1 + max_len: 128 + }]; string given_name = 5; string family_name = 6; string middle_name = 7; @@ -243,7 +249,10 @@ message SignupResponse { message LoginRequest { string email = 1 [(buf.validate.field).string.max_len = 320]; string phone_number = 2 [(buf.validate.field).string.max_len = 32]; - string password = 3 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; + string password = 3 [(buf.validate.field).string = { + min_len: 1 + max_len: 128 + }]; repeated string roles = 4; repeated string scope = 5; string state = 6; @@ -289,7 +298,10 @@ message VerifyOtpRequest { // Exactly one of email / phone_number is required. string email = 1 [(buf.validate.field).string.max_len = 320]; string phone_number = 2 [(buf.validate.field).string.max_len = 32]; - string otp = 3 [(buf.validate.field).string = {min_len: 1, max_len: 16}]; + string otp = 3 [(buf.validate.field).string = { + min_len: 1 + max_len: 16 + }]; bool is_totp = 4; string state = 5; } @@ -323,8 +335,14 @@ message ResetPasswordRequest { string token = 1; string otp = 2; string phone_number = 3 [(buf.validate.field).string.max_len = 32]; - string password = 4 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; - string confirm_password = 5 [(buf.validate.field).string = {min_len: 1, max_len: 128}]; + string password = 4 [(buf.validate.field).string = { + min_len: 1 + max_len: 128 + }]; + string confirm_password = 5 [(buf.validate.field).string = { + min_len: 1 + max_len: 128 + }]; } message ResetPasswordResponse { string message = 1;