From 24bcf8220babc07ad4db561d47c41252c20e7a44 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 8 Dec 2018 21:56:10 +0300 Subject: [PATCH] Break proto files into public and private API --- Makefile | 8 +- grpc/authn-private.pb.go | 3944 +++++++++++++++++++ grpc/authn-private.pb.gw.go | 455 +++ grpc/authn-private.proto | 106 + grpc/authn.pb.go | 7148 ++++++++++------------------------- grpc/authn.pb.gw.go | 591 +-- grpc/authn.pb_test.go | 40 + grpc/authn.proto | 95 +- 8 files changed, 6716 insertions(+), 5671 deletions(-) create mode 100644 grpc/authn-private.pb.go create mode 100644 grpc/authn-private.pb.gw.go create mode 100644 grpc/authn-private.proto diff --git a/Makefile b/Makefile index a4227ddb7e..340e592ad5 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,9 @@ generate-grpc: Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\ Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\ Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:./grpc \ - grpc/authn.proto - # Workaround for https://github.com/grpc-ecosystem/grpc-gateway/issues/229. + grpc/authn.proto grpc/authn-private.proto + # Workaround for https://github.com/grpc-ecosystem/grpc-gateway/issues/229 sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn.pb.gw.go && rm grpc/authn.pb.gw.go.bak - sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn.pb.go && rm grpc/authn.pb.go.bak \ No newline at end of file + sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn.pb.go && rm grpc/authn.pb.go.bak + sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn-private.pb.gw.go && rm grpc/authn-private.pb.gw.go.bak + sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn-private.pb.go && rm grpc/authn-private.pb.go.bak \ No newline at end of file diff --git a/grpc/authn-private.pb.go b/grpc/authn-private.pb.go new file mode 100644 index 0000000000..ea1089f8ae --- /dev/null +++ b/grpc/authn-private.pb.go @@ -0,0 +1,3944 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: authn-private.proto + +package grpc + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/googleapis/google/api" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type GetAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAccountRequest) Reset() { *m = GetAccountRequest{} } +func (*GetAccountRequest) ProtoMessage() {} +func (*GetAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{0} +} +func (m *GetAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccountRequest.Merge(dst, src) +} +func (m *GetAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *GetAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccountRequest proto.InternalMessageInfo + +func (m *GetAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type GetAccountResponse struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` + Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAccountResponse) Reset() { *m = GetAccountResponse{} } +func (*GetAccountResponse) ProtoMessage() {} +func (*GetAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{1} +} +func (m *GetAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccountResponse.Merge(dst, src) +} +func (m *GetAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *GetAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccountResponse proto.InternalMessageInfo + +func (m *GetAccountResponse) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *GetAccountResponse) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *GetAccountResponse) GetLocked() bool { + if m != nil { + return m.Locked + } + return false +} + +func (m *GetAccountResponse) GetDeleted() bool { + if m != nil { + return m.Deleted + } + return false +} + +type GetAccountResponseEnvelope struct { + Result *GetAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAccountResponseEnvelope) Reset() { *m = GetAccountResponseEnvelope{} } +func (*GetAccountResponseEnvelope) ProtoMessage() {} +func (*GetAccountResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{2} +} +func (m *GetAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAccountResponseEnvelope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAccountResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccountResponseEnvelope.Merge(dst, src) +} +func (m *GetAccountResponseEnvelope) XXX_Size() int { + return m.Size() +} +func (m *GetAccountResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccountResponseEnvelope.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccountResponseEnvelope proto.InternalMessageInfo + +func (m *GetAccountResponseEnvelope) GetResult() *GetAccountResponse { + if m != nil { + return m.Result + } + return nil +} + +type UpdateAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateAccountRequest) Reset() { *m = UpdateAccountRequest{} } +func (*UpdateAccountRequest) ProtoMessage() {} +func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{3} +} +func (m *UpdateAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UpdateAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAccountRequest.Merge(dst, src) +} +func (m *UpdateAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *UpdateAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateAccountRequest proto.InternalMessageInfo + +func (m *UpdateAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *UpdateAccountRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +type LockAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LockAccountRequest) Reset() { *m = LockAccountRequest{} } +func (*LockAccountRequest) ProtoMessage() {} +func (*LockAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{4} +} +func (m *LockAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LockAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *LockAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LockAccountRequest.Merge(dst, src) +} +func (m *LockAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *LockAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LockAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LockAccountRequest proto.InternalMessageInfo + +func (m *LockAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type UnlockAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnlockAccountRequest) Reset() { *m = UnlockAccountRequest{} } +func (*UnlockAccountRequest) ProtoMessage() {} +func (*UnlockAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{5} +} +func (m *UnlockAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnlockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnlockAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnlockAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnlockAccountRequest.Merge(dst, src) +} +func (m *UnlockAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *UnlockAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UnlockAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UnlockAccountRequest proto.InternalMessageInfo + +func (m *UnlockAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type ArchiveAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ArchiveAccountRequest) Reset() { *m = ArchiveAccountRequest{} } +func (*ArchiveAccountRequest) ProtoMessage() {} +func (*ArchiveAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{6} +} +func (m *ArchiveAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ArchiveAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ArchiveAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ArchiveAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ArchiveAccountRequest.Merge(dst, src) +} +func (m *ArchiveAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *ArchiveAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ArchiveAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ArchiveAccountRequest proto.InternalMessageInfo + +func (m *ArchiveAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type ImportAccountRequst struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportAccountRequst) Reset() { *m = ImportAccountRequst{} } +func (*ImportAccountRequst) ProtoMessage() {} +func (*ImportAccountRequst) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{7} +} +func (m *ImportAccountRequst) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImportAccountRequst) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImportAccountRequst.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ImportAccountRequst) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportAccountRequst.Merge(dst, src) +} +func (m *ImportAccountRequst) XXX_Size() int { + return m.Size() +} +func (m *ImportAccountRequst) XXX_DiscardUnknown() { + xxx_messageInfo_ImportAccountRequst.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportAccountRequst proto.InternalMessageInfo + +func (m *ImportAccountRequst) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *ImportAccountRequst) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +func (m *ImportAccountRequst) GetLocked() bool { + if m != nil { + return m.Locked + } + return false +} + +type ImportAccountResponse struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportAccountResponse) Reset() { *m = ImportAccountResponse{} } +func (*ImportAccountResponse) ProtoMessage() {} +func (*ImportAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{8} +} +func (m *ImportAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImportAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImportAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ImportAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportAccountResponse.Merge(dst, src) +} +func (m *ImportAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *ImportAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ImportAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportAccountResponse proto.InternalMessageInfo + +func (m *ImportAccountResponse) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +type ImportAccountResponseEnvelope struct { + Result *ImportAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportAccountResponseEnvelope) Reset() { *m = ImportAccountResponseEnvelope{} } +func (*ImportAccountResponseEnvelope) ProtoMessage() {} +func (*ImportAccountResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{9} +} +func (m *ImportAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImportAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImportAccountResponseEnvelope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ImportAccountResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportAccountResponseEnvelope.Merge(dst, src) +} +func (m *ImportAccountResponseEnvelope) XXX_Size() int { + return m.Size() +} +func (m *ImportAccountResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_ImportAccountResponseEnvelope.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportAccountResponseEnvelope proto.InternalMessageInfo + +func (m *ImportAccountResponseEnvelope) GetResult() *ImportAccountResponse { + if m != nil { + return m.Result + } + return nil +} + +type ExpirePasswordRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExpirePasswordRequest) Reset() { *m = ExpirePasswordRequest{} } +func (*ExpirePasswordRequest) ProtoMessage() {} +func (*ExpirePasswordRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{10} +} +func (m *ExpirePasswordRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExpirePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExpirePasswordRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ExpirePasswordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpirePasswordRequest.Merge(dst, src) +} +func (m *ExpirePasswordRequest) XXX_Size() int { + return m.Size() +} +func (m *ExpirePasswordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ExpirePasswordRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ExpirePasswordRequest proto.InternalMessageInfo + +func (m *ExpirePasswordRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type ServiceStatsResponse struct { + Actives *ServiceStatsResponseActiveStats `protobuf:"bytes,1,opt,name=actives" json:"actives,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceStatsResponse) Reset() { *m = ServiceStatsResponse{} } +func (*ServiceStatsResponse) ProtoMessage() {} +func (*ServiceStatsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{11} +} +func (m *ServiceStatsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceStatsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ServiceStatsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceStatsResponse.Merge(dst, src) +} +func (m *ServiceStatsResponse) XXX_Size() int { + return m.Size() +} +func (m *ServiceStatsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceStatsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceStatsResponse proto.InternalMessageInfo + +func (m *ServiceStatsResponse) GetActives() *ServiceStatsResponseActiveStats { + if m != nil { + return m.Actives + } + return nil +} + +type ServiceStatsResponseActiveStats struct { + Daily map[string]int64 `protobuf:"bytes,1,rep,name=daily" json:"daily,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Weekly map[string]int64 `protobuf:"bytes,2,rep,name=weekly" json:"weekly,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Monthly map[string]int64 `protobuf:"bytes,3,rep,name=monthly" json:"monthly,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceStatsResponseActiveStats) Reset() { *m = ServiceStatsResponseActiveStats{} } +func (*ServiceStatsResponseActiveStats) ProtoMessage() {} +func (*ServiceStatsResponseActiveStats) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{11, 0} +} +func (m *ServiceStatsResponseActiveStats) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceStatsResponseActiveStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceStatsResponseActiveStats.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ServiceStatsResponseActiveStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceStatsResponseActiveStats.Merge(dst, src) +} +func (m *ServiceStatsResponseActiveStats) XXX_Size() int { + return m.Size() +} +func (m *ServiceStatsResponseActiveStats) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceStatsResponseActiveStats.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceStatsResponseActiveStats proto.InternalMessageInfo + +func (m *ServiceStatsResponseActiveStats) GetDaily() map[string]int64 { + if m != nil { + return m.Daily + } + return nil +} + +func (m *ServiceStatsResponseActiveStats) GetWeekly() map[string]int64 { + if m != nil { + return m.Weekly + } + return nil +} + +func (m *ServiceStatsResponseActiveStats) GetMonthly() map[string]int64 { + if m != nil { + return m.Monthly + } + return nil +} + +func init() { + proto.RegisterType((*GetAccountRequest)(nil), "grpc.GetAccountRequest") + proto.RegisterType((*GetAccountResponse)(nil), "grpc.GetAccountResponse") + proto.RegisterType((*GetAccountResponseEnvelope)(nil), "grpc.GetAccountResponseEnvelope") + proto.RegisterType((*UpdateAccountRequest)(nil), "grpc.UpdateAccountRequest") + proto.RegisterType((*LockAccountRequest)(nil), "grpc.LockAccountRequest") + proto.RegisterType((*UnlockAccountRequest)(nil), "grpc.UnlockAccountRequest") + proto.RegisterType((*ArchiveAccountRequest)(nil), "grpc.ArchiveAccountRequest") + proto.RegisterType((*ImportAccountRequst)(nil), "grpc.ImportAccountRequst") + proto.RegisterType((*ImportAccountResponse)(nil), "grpc.ImportAccountResponse") + proto.RegisterType((*ImportAccountResponseEnvelope)(nil), "grpc.ImportAccountResponseEnvelope") + proto.RegisterType((*ExpirePasswordRequest)(nil), "grpc.ExpirePasswordRequest") + proto.RegisterType((*ServiceStatsResponse)(nil), "grpc.ServiceStatsResponse") + proto.RegisterType((*ServiceStatsResponseActiveStats)(nil), "grpc.ServiceStatsResponse.active_stats") + proto.RegisterMapType((map[string]int64)(nil), "grpc.ServiceStatsResponse.active_stats.DailyEntry") + proto.RegisterMapType((map[string]int64)(nil), "grpc.ServiceStatsResponse.active_stats.MonthlyEntry") + proto.RegisterMapType((map[string]int64)(nil), "grpc.ServiceStatsResponse.active_stats.WeeklyEntry") +} +func (this *GetAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetAccountRequest) + if !ok { + that2, ok := that.(GetAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *GetAccountResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetAccountResponse) + if !ok { + that2, ok := that.(GetAccountResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Username != that1.Username { + return false + } + if this.Locked != that1.Locked { + return false + } + if this.Deleted != that1.Deleted { + return false + } + return true +} +func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetAccountResponseEnvelope) + if !ok { + that2, ok := that.(GetAccountResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Result.Equal(that1.Result) { + return false + } + return true +} +func (this *UpdateAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UpdateAccountRequest) + if !ok { + that2, ok := that.(UpdateAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Username != that1.Username { + return false + } + return true +} +func (this *LockAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LockAccountRequest) + if !ok { + that2, ok := that.(LockAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *UnlockAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnlockAccountRequest) + if !ok { + that2, ok := that.(UnlockAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ArchiveAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ArchiveAccountRequest) + if !ok { + that2, ok := that.(ArchiveAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ImportAccountRequst) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountRequst) + if !ok { + that2, ok := that.(ImportAccountRequst) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + if this.Password != that1.Password { + return false + } + if this.Locked != that1.Locked { + return false + } + return true +} +func (this *ImportAccountResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountResponse) + if !ok { + that2, ok := that.(ImportAccountResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ImportAccountResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountResponseEnvelope) + if !ok { + that2, ok := that.(ImportAccountResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Result.Equal(that1.Result) { + return false + } + return true +} +func (this *ExpirePasswordRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ExpirePasswordRequest) + if !ok { + that2, ok := that.(ExpirePasswordRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ServiceStatsResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ServiceStatsResponse) + if !ok { + that2, ok := that.(ServiceStatsResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Actives.Equal(that1.Actives) { + return false + } + return true +} +func (this *ServiceStatsResponseActiveStats) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ServiceStatsResponseActiveStats) + if !ok { + that2, ok := that.(ServiceStatsResponseActiveStats) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Daily) != len(that1.Daily) { + return false + } + for i := range this.Daily { + if this.Daily[i] != that1.Daily[i] { + return false + } + } + if len(this.Weekly) != len(that1.Weekly) { + return false + } + for i := range this.Weekly { + if this.Weekly[i] != that1.Weekly[i] { + return false + } + } + if len(this.Monthly) != len(that1.Monthly) { + return false + } + for i := range this.Monthly { + if this.Monthly[i] != that1.Monthly[i] { + return false + } + } + return true +} +func (this *GetAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.GetAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&grpc.GetAccountResponse{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") + s = append(s, "Deleted: "+fmt.Sprintf("%#v", this.Deleted)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetAccountResponseEnvelope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.GetAccountResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UpdateAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&grpc.UpdateAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *LockAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.LockAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnlockAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.UnlockAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ArchiveAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ArchiveAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ImportAccountRequst) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&grpc.ImportAccountRequst{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ImportAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ImportAccountResponse{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ImportAccountResponseEnvelope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ImportAccountResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ExpirePasswordRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ExpirePasswordRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceStatsResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ServiceStatsResponse{") + if this.Actives != nil { + s = append(s, "Actives: "+fmt.Sprintf("%#v", this.Actives)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceStatsResponseActiveStats) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&grpc.ServiceStatsResponseActiveStats{") + keysForDaily := make([]string, 0, len(this.Daily)) + for k, _ := range this.Daily { + keysForDaily = append(keysForDaily, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForDaily) + mapStringForDaily := "map[string]int64{" + for _, k := range keysForDaily { + mapStringForDaily += fmt.Sprintf("%#v: %#v,", k, this.Daily[k]) + } + mapStringForDaily += "}" + if this.Daily != nil { + s = append(s, "Daily: "+mapStringForDaily+",\n") + } + keysForWeekly := make([]string, 0, len(this.Weekly)) + for k, _ := range this.Weekly { + keysForWeekly = append(keysForWeekly, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForWeekly) + mapStringForWeekly := "map[string]int64{" + for _, k := range keysForWeekly { + mapStringForWeekly += fmt.Sprintf("%#v: %#v,", k, this.Weekly[k]) + } + mapStringForWeekly += "}" + if this.Weekly != nil { + s = append(s, "Weekly: "+mapStringForWeekly+",\n") + } + keysForMonthly := make([]string, 0, len(this.Monthly)) + for k, _ := range this.Monthly { + keysForMonthly = append(keysForMonthly, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMonthly) + mapStringForMonthly := "map[string]int64{" + for _, k := range keysForMonthly { + mapStringForMonthly += fmt.Sprintf("%#v: %#v,", k, this.Monthly[k]) + } + mapStringForMonthly += "}" + if this.Monthly != nil { + s = append(s, "Monthly: "+mapStringForMonthly+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringAuthnPrivate(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// AdminAuthNClient is the client API for AdminAuthN service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AdminAuthNClient interface { + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) + UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) + ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) + ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) +} + +type adminAuthNClient struct { + cc *grpc.ClientConn +} + +func NewAdminAuthNClient(cc *grpc.ClientConn) AdminAuthNClient { + return &adminAuthNClient{cc} +} + +func (c *adminAuthNClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) { + out := new(GetAccountResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/GetAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/UpdateAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/LockAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/UnlockAcount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ArchiveAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) { + out := new(ImportAccountResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ImportAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ExpirePassword", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) { + out := new(ServiceStatsResponse) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ServiceStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AdminAuthNServer is the server API for AdminAuthN service. +type AdminAuthNServer interface { + GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponseEnvelope, error) + UpdateAccount(context.Context, *UpdateAccountRequest) (*types.Empty, error) + LockAccount(context.Context, *LockAccountRequest) (*types.Empty, error) + UnlockAcount(context.Context, *UnlockAccountRequest) (*types.Empty, error) + ArchiveAccount(context.Context, *ArchiveAccountRequest) (*types.Empty, error) + ImportAccount(context.Context, *ImportAccountRequst) (*ImportAccountResponseEnvelope, error) + ExpirePassword(context.Context, *ExpirePasswordRequest) (*types.Empty, error) + ServiceStats(context.Context, *types.Empty) (*ServiceStatsResponse, error) +} + +func RegisterAdminAuthNServer(s *grpc.Server, srv AdminAuthNServer) { + s.RegisterService(&_AdminAuthN_serviceDesc, srv) +} + +func _AdminAuthN_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/GetAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).GetAccount(ctx, req.(*GetAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).UpdateAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/UpdateAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).UpdateAccount(ctx, req.(*UpdateAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_LockAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LockAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).LockAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/LockAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).LockAccount(ctx, req.(*LockAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_UnlockAcount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnlockAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).UnlockAcount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/UnlockAcount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).UnlockAcount(ctx, req.(*UnlockAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_ArchiveAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).ArchiveAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/ArchiveAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).ArchiveAccount(ctx, req.(*ArchiveAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_ImportAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportAccountRequst) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).ImportAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/ImportAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).ImportAccount(ctx, req.(*ImportAccountRequst)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_ExpirePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExpirePasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).ExpirePassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/ExpirePassword", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).ExpirePassword(ctx, req.(*ExpirePasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_ServiceStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).ServiceStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/ServiceStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).ServiceStats(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _AdminAuthN_serviceDesc = grpc.ServiceDesc{ + ServiceName: "grpc.AdminAuthN", + HandlerType: (*AdminAuthNServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAccount", + Handler: _AdminAuthN_GetAccount_Handler, + }, + { + MethodName: "UpdateAccount", + Handler: _AdminAuthN_UpdateAccount_Handler, + }, + { + MethodName: "LockAccount", + Handler: _AdminAuthN_LockAccount_Handler, + }, + { + MethodName: "UnlockAcount", + Handler: _AdminAuthN_UnlockAcount_Handler, + }, + { + MethodName: "ArchiveAccount", + Handler: _AdminAuthN_ArchiveAccount_Handler, + }, + { + MethodName: "ImportAccount", + Handler: _AdminAuthN_ImportAccount_Handler, + }, + { + MethodName: "ExpirePassword", + Handler: _AdminAuthN_ExpirePassword_Handler, + }, + { + MethodName: "ServiceStats", + Handler: _AdminAuthN_ServiceStats_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn-private.proto", +} + +func (m *GetAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *GetAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) + } + if len(m.Username) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if m.Locked { + dAtA[i] = 0x18 + i++ + if m.Locked { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Deleted { + dAtA[i] = 0x20 + i++ + if m.Deleted { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *GetAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Result.Size())) + n1, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *UpdateAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.Username) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *LockAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LockAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *UnlockAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnlockAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *ArchiveAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ArchiveAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *ImportAccountRequst) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportAccountRequst) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + if m.Locked { + dAtA[i] = 0x18 + i++ + if m.Locked { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ImportAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) + } + return i, nil +} + +func (m *ImportAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Result.Size())) + n2, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} + +func (m *ExpirePasswordRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpirePasswordRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *ServiceStatsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceStatsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Actives != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Actives.Size())) + n3, err := m.Actives.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} + +func (m *ServiceStatsResponseActiveStats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceStatsResponseActiveStats) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Daily) > 0 { + for k, _ := range m.Daily { + dAtA[i] = 0xa + i++ + v := m.Daily[k] + mapSize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(v)) + } + } + if len(m.Weekly) > 0 { + for k, _ := range m.Weekly { + dAtA[i] = 0x12 + i++ + v := m.Weekly[k] + mapSize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(v)) + } + } + if len(m.Monthly) > 0 { + for k, _ := range m.Monthly { + dAtA[i] = 0x1a + i++ + v := m.Monthly[k] + mapSize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(v)) + } + } + return i, nil +} + +func encodeVarintAuthnPrivate(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *GetAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *GetAccountResponse) Size() (n int) { + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) + } + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + if m.Locked { + n += 2 + } + if m.Deleted { + n += 2 + } + return n +} + +func (m *GetAccountResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *UpdateAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *LockAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *UnlockAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ArchiveAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ImportAccountRequst) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + if m.Locked { + n += 2 + } + return n +} + +func (m *ImportAccountResponse) Size() (n int) { + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) + } + return n +} + +func (m *ImportAccountResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ExpirePasswordRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ServiceStatsResponse) Size() (n int) { + var l int + _ = l + if m.Actives != nil { + l = m.Actives.Size() + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ServiceStatsResponseActiveStats) Size() (n int) { + var l int + _ = l + if len(m.Daily) > 0 { + for k, v := range m.Daily { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + n += mapEntrySize + 1 + sovAuthnPrivate(uint64(mapEntrySize)) + } + } + if len(m.Weekly) > 0 { + for k, v := range m.Weekly { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + n += mapEntrySize + 1 + sovAuthnPrivate(uint64(mapEntrySize)) + } + } + if len(m.Monthly) > 0 { + for k, v := range m.Monthly { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + n += mapEntrySize + 1 + sovAuthnPrivate(uint64(mapEntrySize)) + } + } + return n +} + +func sovAuthnPrivate(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAuthnPrivate(x uint64) (n int) { + return sovAuthnPrivate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *GetAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *GetAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAccountResponse{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, + `Deleted:` + fmt.Sprintf("%v", this.Deleted) + `,`, + `}`, + }, "") + return s +} +func (this *GetAccountResponseEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAccountResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "GetAccountResponse", "GetAccountResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *LockAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LockAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *UnlockAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnlockAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ArchiveAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ArchiveAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ImportAccountRequst) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImportAccountRequst{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, + `}`, + }, "") + return s +} +func (this *ImportAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImportAccountResponse{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ImportAccountResponseEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImportAccountResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "ImportAccountResponse", "ImportAccountResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ExpirePasswordRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExpirePasswordRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceStatsResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceStatsResponse{`, + `Actives:` + strings.Replace(fmt.Sprintf("%v", this.Actives), "ServiceStatsResponseActiveStats", "ServiceStatsResponseActiveStats", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceStatsResponseActiveStats) String() string { + if this == nil { + return "nil" + } + keysForDaily := make([]string, 0, len(this.Daily)) + for k, _ := range this.Daily { + keysForDaily = append(keysForDaily, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForDaily) + mapStringForDaily := "map[string]int64{" + for _, k := range keysForDaily { + mapStringForDaily += fmt.Sprintf("%v: %v,", k, this.Daily[k]) + } + mapStringForDaily += "}" + keysForWeekly := make([]string, 0, len(this.Weekly)) + for k, _ := range this.Weekly { + keysForWeekly = append(keysForWeekly, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForWeekly) + mapStringForWeekly := "map[string]int64{" + for _, k := range keysForWeekly { + mapStringForWeekly += fmt.Sprintf("%v: %v,", k, this.Weekly[k]) + } + mapStringForWeekly += "}" + keysForMonthly := make([]string, 0, len(this.Monthly)) + for k, _ := range this.Monthly { + keysForMonthly = append(keysForMonthly, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMonthly) + mapStringForMonthly := "map[string]int64{" + for _, k := range keysForMonthly { + mapStringForMonthly += fmt.Sprintf("%v: %v,", k, this.Monthly[k]) + } + mapStringForMonthly += "}" + s := strings.Join([]string{`&ServiceStatsResponseActiveStats{`, + `Daily:` + mapStringForDaily + `,`, + `Weekly:` + mapStringForWeekly + `,`, + `Monthly:` + mapStringForMonthly + `,`, + `}`, + }, "") + return s +} +func valueToStringAuthnPrivate(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Locked = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Deleted = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &GetAccountResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LockAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnlockAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnlockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ArchiveAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ArchiveAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportAccountRequst: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportAccountRequst: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Locked = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportAccountResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &ImportAccountResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpirePasswordRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpirePasswordRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpirePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceStatsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceStatsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Actives", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Actives == nil { + m.Actives = &ServiceStatsResponseActiveStats{} + } + if err := m.Actives.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceStatsResponseActiveStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: active_stats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: active_stats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Daily", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Daily == nil { + m.Daily = make(map[string]int64) + } + var mapkey string + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthAuthnPrivate + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Daily[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Weekly", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Weekly == nil { + m.Weekly = make(map[string]int64) + } + var mapkey string + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthAuthnPrivate + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Weekly[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Monthly", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Monthly == nil { + m.Monthly = make(map[string]int64) + } + var mapkey string + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthAuthnPrivate + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Monthly[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuthnPrivate(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthAuthnPrivate + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipAuthnPrivate(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthAuthnPrivate = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthnPrivate = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("authn-private.proto", fileDescriptor_authn_private_d4727a028c8ad90a) } + +var fileDescriptor_authn_private_d4727a028c8ad90a = []byte{ + // 843 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcd, 0x6e, 0xf3, 0x54, + 0x10, 0x8d, 0x93, 0x7e, 0x69, 0x98, 0xe4, 0x8b, 0xca, 0x6d, 0x92, 0x9a, 0x5b, 0x6a, 0x22, 0x17, + 0xb5, 0x55, 0xa5, 0xda, 0x28, 0x65, 0x51, 0xb2, 0x4b, 0x45, 0x04, 0x08, 0xa8, 0x50, 0x4a, 0x85, + 0x84, 0x40, 0x95, 0x6b, 0x5f, 0x12, 0x2b, 0x8e, 0xaf, 0xb1, 0xaf, 0x53, 0x22, 0x84, 0x84, 0xfa, + 0x04, 0x48, 0x3c, 0x03, 0x88, 0x47, 0x61, 0x59, 0x89, 0x0d, 0x2b, 0x44, 0x03, 0x0b, 0xc4, 0xaa, + 0x8f, 0xf0, 0xc9, 0xd7, 0x76, 0xe2, 0x24, 0x76, 0x7f, 0x76, 0x19, 0x7b, 0xe6, 0x9c, 0x99, 0x39, + 0x9e, 0xa3, 0xc0, 0xa6, 0xe6, 0xb3, 0x81, 0x7d, 0xe4, 0xb8, 0xe6, 0x58, 0x63, 0x44, 0x71, 0x5c, + 0xca, 0x28, 0x5a, 0xeb, 0xbb, 0x8e, 0x8e, 0xb7, 0xfb, 0x94, 0xf6, 0x2d, 0xa2, 0xf2, 0x67, 0x57, + 0xfe, 0x37, 0x2a, 0x19, 0x39, 0x6c, 0x12, 0xa6, 0xe0, 0xa3, 0xbe, 0xc9, 0x06, 0xfe, 0x95, 0xa2, + 0xd3, 0x91, 0xda, 0xa7, 0x7d, 0x3a, 0xcf, 0x0a, 0x22, 0x1e, 0xf0, 0x5f, 0x51, 0xfa, 0x9b, 0x11, + 0x96, 0xe6, 0x98, 0xaa, 0x66, 0xdb, 0x94, 0x69, 0xcc, 0xa4, 0xb6, 0x17, 0xbe, 0x95, 0x77, 0xe1, + 0xf5, 0x0f, 0x08, 0xeb, 0xe8, 0x3a, 0xf5, 0x6d, 0xd6, 0x23, 0xdf, 0xfa, 0xc4, 0x63, 0xa8, 0x0a, + 0x79, 0xd3, 0x10, 0x85, 0xa6, 0x70, 0xf0, 0x5a, 0x2f, 0x6f, 0x1a, 0xb2, 0x0b, 0x28, 0x99, 0xe4, + 0x39, 0xd4, 0xf6, 0x48, 0x22, 0xab, 0x10, 0x64, 0x21, 0x0c, 0x25, 0xdf, 0x23, 0xae, 0xad, 0x8d, + 0x88, 0x98, 0xe7, 0xb5, 0xb3, 0x18, 0x35, 0xa0, 0x68, 0x51, 0x7d, 0x48, 0x0c, 0xb1, 0xd0, 0x14, + 0x0e, 0x4a, 0xbd, 0x28, 0x42, 0x22, 0xac, 0x1b, 0xc4, 0x22, 0x8c, 0x18, 0xe2, 0x1a, 0x7f, 0x11, + 0x87, 0xf2, 0x19, 0xe0, 0x55, 0xce, 0xae, 0x3d, 0x26, 0x16, 0x75, 0x08, 0x7a, 0x07, 0x8a, 0x2e, + 0xf1, 0x7c, 0x8b, 0x71, 0xfe, 0x72, 0x4b, 0x54, 0x82, 0xbd, 0x29, 0xab, 0x15, 0xbd, 0x28, 0x4f, + 0x3e, 0x85, 0xda, 0x85, 0x63, 0x68, 0x8c, 0x3c, 0x3c, 0xeb, 0x43, 0x53, 0xc8, 0x6f, 0x03, 0xfa, + 0x84, 0xea, 0xc3, 0x47, 0xb6, 0xb5, 0x07, 0xb5, 0x0b, 0xdb, 0x7a, 0x3c, 0x6f, 0x1f, 0xea, 0x1d, + 0x57, 0x1f, 0x98, 0xe3, 0x47, 0x5a, 0x92, 0x09, 0x6c, 0x7e, 0x34, 0x72, 0xa8, 0x9b, 0x94, 0xc9, + 0x63, 0x0b, 0x9d, 0x0a, 0x4b, 0xfb, 0xc6, 0x50, 0x72, 0x34, 0xcf, 0xbb, 0xa6, 0xae, 0x11, 0x4f, + 0x11, 0xc7, 0x59, 0x5a, 0xc8, 0x2a, 0xd4, 0x97, 0x68, 0x22, 0xa1, 0x1b, 0x73, 0xa1, 0x4f, 0x8b, + 0xff, 0xff, 0xf5, 0x56, 0xde, 0x34, 0x78, 0x5f, 0x9f, 0xc3, 0x4e, 0x6a, 0xc1, 0x4c, 0xa5, 0xe3, + 0x25, 0x95, 0xb6, 0x43, 0x95, 0x52, 0x8b, 0x66, 0x42, 0xed, 0x43, 0xbd, 0xfb, 0x9d, 0x63, 0xba, + 0xe4, 0xb3, 0xa8, 0xe1, 0xac, 0xb5, 0xdc, 0xac, 0x41, 0xed, 0x9c, 0xb8, 0x63, 0x53, 0x27, 0xe7, + 0x4c, 0x63, 0xde, 0xac, 0xdf, 0x0e, 0xac, 0x6b, 0x3a, 0x33, 0xc7, 0xc4, 0x8b, 0x78, 0xf7, 0x43, + 0xde, 0xb4, 0x64, 0x25, 0xcc, 0xbc, 0xf4, 0xf8, 0xc3, 0xb8, 0x0e, 0xff, 0x5a, 0x80, 0x4a, 0xf2, + 0x0d, 0xfa, 0x10, 0x5e, 0x18, 0x9a, 0x69, 0x4d, 0x44, 0xa1, 0x59, 0x38, 0x28, 0xb7, 0x5a, 0x4f, + 0x44, 0x54, 0xde, 0x0f, 0x8a, 0xba, 0x36, 0x73, 0x27, 0xbd, 0x10, 0x00, 0x7d, 0x0c, 0xc5, 0x6b, + 0x42, 0x86, 0xd6, 0x44, 0xcc, 0x73, 0xa8, 0xe3, 0xa7, 0x42, 0x7d, 0xc1, 0xab, 0x42, 0xac, 0x08, + 0x02, 0x9d, 0xc1, 0xfa, 0x88, 0xda, 0x6c, 0x60, 0x4d, 0xc4, 0x02, 0x47, 0x7b, 0xf7, 0xa9, 0x68, + 0x9f, 0x86, 0x65, 0x21, 0x5c, 0x0c, 0x82, 0x4f, 0x00, 0xe6, 0x1d, 0xa3, 0x0d, 0x28, 0x0c, 0xc9, + 0x24, 0x5a, 0x79, 0xf0, 0x13, 0xd5, 0xe0, 0xc5, 0x58, 0xb3, 0xfc, 0xf0, 0x34, 0x0a, 0xbd, 0x30, + 0x68, 0xe7, 0x4f, 0x04, 0xfc, 0x1e, 0x94, 0x13, 0x0d, 0x3e, 0xab, 0xb4, 0x0d, 0x95, 0x64, 0x37, + 0xcf, 0xa9, 0x6d, 0xfd, 0x52, 0x04, 0xe8, 0x18, 0x23, 0xd3, 0xee, 0xf8, 0x6c, 0x70, 0x86, 0x2e, + 0x01, 0xe6, 0x1e, 0x80, 0xb6, 0x56, 0x5d, 0x81, 0x7f, 0x4a, 0xb8, 0x99, 0x65, 0x17, 0xf1, 0xa7, + 0x2b, 0x37, 0x6e, 0xfe, 0xf8, 0xf7, 0xe7, 0xfc, 0x06, 0xaa, 0xaa, 0x5a, 0x98, 0xe1, 0xa9, 0xdf, + 0x9b, 0xc6, 0x0f, 0x88, 0xc0, 0xcb, 0x05, 0x1b, 0x41, 0x38, 0x84, 0x4a, 0xf3, 0x16, 0xdc, 0x50, + 0x42, 0xef, 0x55, 0x62, 0x87, 0x56, 0xba, 0x81, 0x8f, 0xcb, 0x4d, 0x0e, 0x8e, 0xf1, 0x12, 0x78, + 0x7b, 0x7e, 0xbf, 0x5f, 0x41, 0x39, 0xe1, 0x34, 0x28, 0xb2, 0xb7, 0x55, 0xf3, 0xc9, 0xa4, 0xd8, + 0xe6, 0x14, 0x75, 0xbc, 0xb9, 0x48, 0xa1, 0x06, 0xb7, 0x8e, 0x34, 0xa8, 0xc4, 0x0e, 0xb5, 0x30, + 0x43, 0x8a, 0x6b, 0x65, 0x12, 0xec, 0x70, 0x82, 0x2d, 0x5c, 0x5f, 0x22, 0xf0, 0x39, 0x08, 0xfa, + 0x1a, 0xaa, 0x8b, 0xe6, 0x86, 0xa2, 0xe3, 0x4f, 0xb5, 0xbc, 0x4c, 0x96, 0x48, 0x86, 0xc3, 0x65, + 0x19, 0x2c, 0x78, 0xb9, 0xe0, 0x22, 0xe8, 0x8d, 0x54, 0x6b, 0x09, 0x7c, 0x12, 0xef, 0x3e, 0xe0, + 0x3a, 0x33, 0xbd, 0xa3, 0x7d, 0xc9, 0x1b, 0x73, 0x22, 0x93, 0x17, 0xb4, 0x85, 0x43, 0x34, 0x82, + 0xea, 0xa2, 0x25, 0xc5, 0xc3, 0xa4, 0x1a, 0x55, 0xe6, 0x30, 0x7b, 0x9c, 0xa3, 0x89, 0xa5, 0xa5, + 0x95, 0x11, 0x8e, 0x72, 0x39, 0x33, 0xe8, 0x1e, 0x54, 0x92, 0xf7, 0x8b, 0x32, 0xf0, 0x30, 0xce, + 0xbe, 0x75, 0xb9, 0xca, 0xb9, 0x4a, 0xa8, 0xa8, 0xf2, 0x73, 0x3f, 0x6d, 0xdd, 0xde, 0x49, 0xb9, + 0x3f, 0xef, 0xa4, 0xdc, 0xfd, 0x9d, 0x24, 0xfc, 0x38, 0x95, 0x84, 0xdf, 0xa6, 0x92, 0xf0, 0xfb, + 0x54, 0x12, 0x6e, 0xa7, 0x92, 0xf0, 0xf7, 0x54, 0x12, 0xfe, 0x9b, 0x4a, 0xb9, 0xfb, 0xa9, 0x24, + 0xfc, 0xf4, 0x8f, 0x94, 0xfb, 0x92, 0xff, 0x0b, 0xb9, 0x2a, 0x72, 0xbe, 0xe3, 0x57, 0x01, 0x00, + 0x00, 0xff, 0xff, 0xef, 0xb0, 0xa6, 0xaf, 0xa9, 0x08, 0x00, 0x00, +} diff --git a/grpc/authn-private.pb.gw.go b/grpc/authn-private.pb.gw.go new file mode 100644 index 0000000000..8e9afc5c84 --- /dev/null +++ b/grpc/authn-private.pb.gw.go @@ -0,0 +1,455 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: authn-private.proto + +/* +Package grpc is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package grpc + +import ( + "io" + "net/http" + + "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray + +func request_AdminAuthN_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateAccountRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Username); 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["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UpdateAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_LockAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LockAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.LockAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_UnlockAcount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UnlockAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UnlockAcount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_ArchiveAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ArchiveAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.ArchiveAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_ImportAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ImportAccountRequst + 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.ImportAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_ExpirePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExpirePasswordRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.ExpirePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_ServiceStats_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq types.Empty + var metadata runtime.ServerMetadata + + msg, err := client.ServiceStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +// RegisterAdminAuthNHandlerFromEndpoint is same as RegisterAdminAuthNHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAdminAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAdminAuthNHandler(ctx, mux, conn) +} + +// RegisterAdminAuthNHandler registers the http handlers for service AdminAuthN to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAdminAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAdminAuthNHandlerClient(ctx, mux, NewAdminAuthNClient(conn)) +} + +// RegisterAdminAuthNHandlerClient registers the http handlers for service AdminAuthN +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AdminAuthNClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AdminAuthNClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AdminAuthNClient" to call the correct interceptors. +func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdminAuthNClient) error { + + mux.Handle("GET", pattern_AdminAuthN_GetAccount_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_GetAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_GetAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AdminAuthN_UpdateAccount_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_UpdateAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_UpdateAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AdminAuthN_LockAccount_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_LockAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_LockAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AdminAuthN_UnlockAcount_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_UnlockAcount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_UnlockAcount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_AdminAuthN_ArchiveAccount_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_ArchiveAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_ArchiveAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AdminAuthN_ImportAccount_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_ImportAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_ImportAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AdminAuthN_ExpirePassword_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_ExpirePassword_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_ExpirePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AdminAuthN_ServiceStats_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_ServiceStats_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_ServiceStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_AdminAuthN_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_AdminAuthN_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_AdminAuthN_LockAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "lock"}, "")) + + pattern_AdminAuthN_UnlockAcount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "unlock"}, "")) + + pattern_AdminAuthN_ArchiveAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_AdminAuthN_ImportAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "import"}, "")) + + pattern_AdminAuthN_ExpirePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "expire_password"}, "")) + + pattern_AdminAuthN_ServiceStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"stats"}, "")) +) + +var ( + forward_AdminAuthN_GetAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_UpdateAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_LockAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_UnlockAcount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_ArchiveAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_ImportAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_ExpirePassword_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_ServiceStats_0 = runtime.ForwardResponseMessage +) diff --git a/grpc/authn-private.proto b/grpc/authn-private.proto new file mode 100644 index 0000000000..9b2260d0ac --- /dev/null +++ b/grpc/authn-private.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; + +package grpc; +option go_package = "grpc"; + +import "google/protobuf/empty.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +message GetAccountRequest { string id = 1; } + +message GetAccountResponse { + int64 id = 1; + string username = 2; + bool locked = 3; + bool deleted = 4; +} + +message GetAccountResponseEnvelope { GetAccountResponse result = 1; } + +message UpdateAccountRequest { + string id = 1; + string username = 2; +} + + +message LockAccountRequest { string id = 1; } + +message UnlockAccountRequest { string id = 1; } + +message ArchiveAccountRequest { string id = 1; } + +message ImportAccountRequst { + string username = 1; + string password = 2; + bool locked = 3; +} +message ImportAccountResponse { int64 id = 1 [ (gogoproto.jsontag) = "id" ]; } + +message ImportAccountResponseEnvelope { ImportAccountResponse result = 1; } + + +message ExpirePasswordRequest { string id = 1; } + +message ServiceStatsResponse { + message active_stats { + map daily = 1; + map weekly = 2; + map monthly = 3; + } + active_stats actives = 1; +} + +service AdminAuthN { + + rpc GetAccount(GetAccountRequest) returns (GetAccountResponseEnvelope) { + option (google.api.http) = { + get : "/accounts/{id}", + }; + } + + rpc UpdateAccount(UpdateAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}", + body : "username" + }; + } + + rpc LockAccount(LockAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}/lock" + }; + } + + rpc UnlockAcount(UnlockAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}/unlock" + }; + } + + rpc ArchiveAccount(ArchiveAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete : "/accounts/{id}" + }; + } + + rpc ImportAccount(ImportAccountRequst) + returns (ImportAccountResponseEnvelope) { + option (google.api.http) = { + post : "/accounts/import", + body : "*" + }; + } + + rpc ExpirePassword(ExpirePasswordRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}/expire_password" + }; + } + + rpc ServiceStats(google.protobuf.Empty) returns (ServiceStatsResponse) { + option (google.api.http) = { + get : "/stats" + }; + } +} \ No newline at end of file diff --git a/grpc/authn.pb.go b/grpc/authn.pb.go index f64d8cb6de..fcaf049c14 100644 --- a/grpc/authn.pb.go +++ b/grpc/authn.pb.go @@ -41,7 +41,7 @@ type SignupRequest struct { func (m *SignupRequest) Reset() { *m = SignupRequest{} } func (*SignupRequest) ProtoMessage() {} func (*SignupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{0} + return fileDescriptor_authn_44d0ba90dadea045, []int{0} } func (m *SignupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +93,7 @@ type SignupResponse struct { func (m *SignupResponse) Reset() { *m = SignupResponse{} } func (*SignupResponse) ProtoMessage() {} func (*SignupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{1} + return fileDescriptor_authn_44d0ba90dadea045, []int{1} } func (m *SignupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -138,7 +138,7 @@ type SignupResponseEnvelope struct { func (m *SignupResponseEnvelope) Reset() { *m = SignupResponseEnvelope{} } func (*SignupResponseEnvelope) ProtoMessage() {} func (*SignupResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{2} + return fileDescriptor_authn_44d0ba90dadea045, []int{2} } func (m *SignupResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -174,23 +174,23 @@ func (m *SignupResponseEnvelope) GetResult() *SignupResponse { return nil } -type GetAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type IsUsernameAvailableRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetAccountRequest) Reset() { *m = GetAccountRequest{} } -func (*GetAccountRequest) ProtoMessage() {} -func (*GetAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{3} +func (m *IsUsernameAvailableRequest) Reset() { *m = IsUsernameAvailableRequest{} } +func (*IsUsernameAvailableRequest) ProtoMessage() {} +func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{3} } -func (m *GetAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *IsUsernameAvailableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GetAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *IsUsernameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GetAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_IsUsernameAvailableRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -200,45 +200,42 @@ func (m *GetAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (dst *GetAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccountRequest.Merge(dst, src) +func (dst *IsUsernameAvailableRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsUsernameAvailableRequest.Merge(dst, src) } -func (m *GetAccountRequest) XXX_Size() int { +func (m *IsUsernameAvailableRequest) XXX_Size() int { return m.Size() } -func (m *GetAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccountRequest.DiscardUnknown(m) +func (m *IsUsernameAvailableRequest) XXX_DiscardUnknown() { + xxx_messageInfo_IsUsernameAvailableRequest.DiscardUnknown(m) } -var xxx_messageInfo_GetAccountRequest proto.InternalMessageInfo +var xxx_messageInfo_IsUsernameAvailableRequest proto.InternalMessageInfo -func (m *GetAccountRequest) GetId() string { +func (m *IsUsernameAvailableRequest) GetUsername() string { if m != nil { - return m.Id + return m.Username } return "" } -type GetAccountResponse struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` - Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"` +type IsUsernameAvailableResponseEnvelope struct { + Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetAccountResponse) Reset() { *m = GetAccountResponse{} } -func (*GetAccountResponse) ProtoMessage() {} -func (*GetAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{4} +func (m *IsUsernameAvailableResponseEnvelope) Reset() { *m = IsUsernameAvailableResponseEnvelope{} } +func (*IsUsernameAvailableResponseEnvelope) ProtoMessage() {} +func (*IsUsernameAvailableResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{4} } -func (m *GetAccountResponse) XXX_Unmarshal(b []byte) error { +func (m *IsUsernameAvailableResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GetAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *IsUsernameAvailableResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GetAccountResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -248,63 +245,43 @@ func (m *GetAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *GetAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccountResponse.Merge(dst, src) +func (dst *IsUsernameAvailableResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Merge(dst, src) } -func (m *GetAccountResponse) XXX_Size() int { +func (m *IsUsernameAvailableResponseEnvelope) XXX_Size() int { return m.Size() } -func (m *GetAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAccountResponse proto.InternalMessageInfo - -func (m *GetAccountResponse) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *GetAccountResponse) GetUsername() string { - if m != nil { - return m.Username - } - return "" +func (m *IsUsernameAvailableResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_IsUsernameAvailableResponseEnvelope.DiscardUnknown(m) } -func (m *GetAccountResponse) GetLocked() bool { - if m != nil { - return m.Locked - } - return false -} +var xxx_messageInfo_IsUsernameAvailableResponseEnvelope proto.InternalMessageInfo -func (m *GetAccountResponse) GetDeleted() bool { +func (m *IsUsernameAvailableResponseEnvelope) GetResult() bool { if m != nil { - return m.Deleted + return m.Result } return false } -type GetAccountResponseEnvelope struct { - Result *GetAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type LoginRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetAccountResponseEnvelope) Reset() { *m = GetAccountResponseEnvelope{} } -func (*GetAccountResponseEnvelope) ProtoMessage() {} -func (*GetAccountResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{5} +func (m *LoginRequest) Reset() { *m = LoginRequest{} } +func (*LoginRequest) ProtoMessage() {} +func (*LoginRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{5} } -func (m *GetAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { +func (m *LoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GetAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GetAccountResponseEnvelope.Marshal(b, m, deterministic) + return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -314,43 +291,49 @@ func (m *GetAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (dst *GetAccountResponseEnvelope) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccountResponseEnvelope.Merge(dst, src) +func (dst *LoginRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoginRequest.Merge(dst, src) } -func (m *GetAccountResponseEnvelope) XXX_Size() int { +func (m *LoginRequest) XXX_Size() int { return m.Size() } -func (m *GetAccountResponseEnvelope) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccountResponseEnvelope.DiscardUnknown(m) +func (m *LoginRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LoginRequest.DiscardUnknown(m) } -var xxx_messageInfo_GetAccountResponseEnvelope proto.InternalMessageInfo +var xxx_messageInfo_LoginRequest proto.InternalMessageInfo + +func (m *LoginRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} -func (m *GetAccountResponseEnvelope) GetResult() *GetAccountResponse { +func (m *LoginRequest) GetPassword() string { if m != nil { - return m.Result + return m.Password } - return nil + return "" } -type UpdateAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` +type PasswordResetRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *UpdateAccountRequest) Reset() { *m = UpdateAccountRequest{} } -func (*UpdateAccountRequest) ProtoMessage() {} -func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{6} +func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } +func (*PasswordResetRequest) ProtoMessage() {} +func (*PasswordResetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{6} } -func (m *UpdateAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *UpdateAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_UpdateAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_PasswordResetRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -360,49 +343,44 @@ func (m *UpdateAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (dst *UpdateAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateAccountRequest.Merge(dst, src) +func (dst *PasswordResetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PasswordResetRequest.Merge(dst, src) } -func (m *UpdateAccountRequest) XXX_Size() int { +func (m *PasswordResetRequest) XXX_Size() int { return m.Size() } -func (m *UpdateAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateAccountRequest.DiscardUnknown(m) +func (m *PasswordResetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PasswordResetRequest.DiscardUnknown(m) } -var xxx_messageInfo_UpdateAccountRequest proto.InternalMessageInfo - -func (m *UpdateAccountRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} +var xxx_messageInfo_PasswordResetRequest proto.InternalMessageInfo -func (m *UpdateAccountRequest) GetUsername() string { +func (m *PasswordResetRequest) GetUsername() string { if m != nil { return m.Username } return "" } -type IsUsernameAvailableRequest struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` +type ChangePasswordRequest struct { + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + CurrentPassword string `protobuf:"bytes,3,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *IsUsernameAvailableRequest) Reset() { *m = IsUsernameAvailableRequest{} } -func (*IsUsernameAvailableRequest) ProtoMessage() {} -func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{7} +func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } +func (*ChangePasswordRequest) ProtoMessage() {} +func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{7} } -func (m *IsUsernameAvailableRequest) XXX_Unmarshal(b []byte) error { +func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *IsUsernameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_IsUsernameAvailableRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -412,42 +390,57 @@ func (m *IsUsernameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (dst *IsUsernameAvailableRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsUsernameAvailableRequest.Merge(dst, src) +func (dst *ChangePasswordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangePasswordRequest.Merge(dst, src) } -func (m *IsUsernameAvailableRequest) XXX_Size() int { +func (m *ChangePasswordRequest) XXX_Size() int { return m.Size() } -func (m *IsUsernameAvailableRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IsUsernameAvailableRequest.DiscardUnknown(m) +func (m *ChangePasswordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m) } -var xxx_messageInfo_IsUsernameAvailableRequest proto.InternalMessageInfo +var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo -func (m *IsUsernameAvailableRequest) GetUsername() string { +func (m *ChangePasswordRequest) GetPassword() string { if m != nil { - return m.Username + return m.Password } return "" } -type IsUsernameAvailableResponseEnvelope struct { - Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result"` +func (m *ChangePasswordRequest) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *ChangePasswordRequest) GetCurrentPassword() string { + if m != nil { + return m.CurrentPassword + } + return "" +} + +type BeginOAuthRequest struct { + ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` + RedirectURI string `protobuf:"bytes,2,opt,name=redirectURI,proto3" json:"redirectURI,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *IsUsernameAvailableResponseEnvelope) Reset() { *m = IsUsernameAvailableResponseEnvelope{} } -func (*IsUsernameAvailableResponseEnvelope) ProtoMessage() {} -func (*IsUsernameAvailableResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{8} +func (m *BeginOAuthRequest) Reset() { *m = BeginOAuthRequest{} } +func (*BeginOAuthRequest) ProtoMessage() {} +func (*BeginOAuthRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{8} } -func (m *IsUsernameAvailableResponseEnvelope) XXX_Unmarshal(b []byte) error { +func (m *BeginOAuthRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *IsUsernameAvailableResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *BeginOAuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Marshal(b, m, deterministic) + return xxx_messageInfo_BeginOAuthRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -457,42 +450,49 @@ func (m *IsUsernameAvailableResponseEnvelope) XXX_Marshal(b []byte, deterministi return b[:n], nil } } -func (dst *IsUsernameAvailableResponseEnvelope) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Merge(dst, src) +func (dst *BeginOAuthRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BeginOAuthRequest.Merge(dst, src) } -func (m *IsUsernameAvailableResponseEnvelope) XXX_Size() int { +func (m *BeginOAuthRequest) XXX_Size() int { return m.Size() } -func (m *IsUsernameAvailableResponseEnvelope) XXX_DiscardUnknown() { - xxx_messageInfo_IsUsernameAvailableResponseEnvelope.DiscardUnknown(m) +func (m *BeginOAuthRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BeginOAuthRequest.DiscardUnknown(m) } -var xxx_messageInfo_IsUsernameAvailableResponseEnvelope proto.InternalMessageInfo +var xxx_messageInfo_BeginOAuthRequest proto.InternalMessageInfo -func (m *IsUsernameAvailableResponseEnvelope) GetResult() bool { +func (m *BeginOAuthRequest) GetProviderName() string { if m != nil { - return m.Result + return m.ProviderName } - return false + return "" +} + +func (m *BeginOAuthRequest) GetRedirectURI() string { + if m != nil { + return m.RedirectURI + } + return "" } -type LockAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type BeginOAuthResponse struct { + Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *LockAccountRequest) Reset() { *m = LockAccountRequest{} } -func (*LockAccountRequest) ProtoMessage() {} -func (*LockAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{9} +func (m *BeginOAuthResponse) Reset() { *m = BeginOAuthResponse{} } +func (*BeginOAuthResponse) ProtoMessage() {} +func (*BeginOAuthResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{9} } -func (m *LockAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *BeginOAuthResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *LockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *BeginOAuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_LockAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_BeginOAuthResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -502,42 +502,42 @@ func (m *LockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *LockAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LockAccountRequest.Merge(dst, src) +func (dst *BeginOAuthResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BeginOAuthResponse.Merge(dst, src) } -func (m *LockAccountRequest) XXX_Size() int { +func (m *BeginOAuthResponse) XXX_Size() int { return m.Size() } -func (m *LockAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LockAccountRequest.DiscardUnknown(m) +func (m *BeginOAuthResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BeginOAuthResponse.DiscardUnknown(m) } -var xxx_messageInfo_LockAccountRequest proto.InternalMessageInfo +var xxx_messageInfo_BeginOAuthResponse proto.InternalMessageInfo -func (m *LockAccountRequest) GetId() string { +func (m *BeginOAuthResponse) GetProvider() string { if m != nil { - return m.Id + return m.Provider } return "" } -type UnlockAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type OAuthReturnRequest struct { + ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *UnlockAccountRequest) Reset() { *m = UnlockAccountRequest{} } -func (*UnlockAccountRequest) ProtoMessage() {} -func (*UnlockAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{10} +func (m *OAuthReturnRequest) Reset() { *m = OAuthReturnRequest{} } +func (*OAuthReturnRequest) ProtoMessage() {} +func (*OAuthReturnRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{10} } -func (m *UnlockAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *OAuthReturnRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *UnlockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *OAuthReturnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_UnlockAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_OAuthReturnRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -547,42 +547,42 @@ func (m *UnlockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (dst *UnlockAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnlockAccountRequest.Merge(dst, src) +func (dst *OAuthReturnRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OAuthReturnRequest.Merge(dst, src) } -func (m *UnlockAccountRequest) XXX_Size() int { +func (m *OAuthReturnRequest) XXX_Size() int { return m.Size() } -func (m *UnlockAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnlockAccountRequest.DiscardUnknown(m) +func (m *OAuthReturnRequest) XXX_DiscardUnknown() { + xxx_messageInfo_OAuthReturnRequest.DiscardUnknown(m) } -var xxx_messageInfo_UnlockAccountRequest proto.InternalMessageInfo +var xxx_messageInfo_OAuthReturnRequest proto.InternalMessageInfo -func (m *UnlockAccountRequest) GetId() string { +func (m *OAuthReturnRequest) GetProviderName() string { if m != nil { - return m.Id + return m.ProviderName } return "" } -type ArchiveAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type OAuthReturnResponse struct { + Redirect string `protobuf:"bytes,1,opt,name=redirect,proto3" json:"redirect,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *ArchiveAccountRequest) Reset() { *m = ArchiveAccountRequest{} } -func (*ArchiveAccountRequest) ProtoMessage() {} -func (*ArchiveAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{11} +func (m *OAuthReturnResponse) Reset() { *m = OAuthReturnResponse{} } +func (*OAuthReturnResponse) ProtoMessage() {} +func (*OAuthReturnResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{11} } -func (m *ArchiveAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *OAuthReturnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ArchiveAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *OAuthReturnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ArchiveAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_OAuthReturnResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -592,44 +592,47 @@ func (m *ArchiveAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (dst *ArchiveAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArchiveAccountRequest.Merge(dst, src) +func (dst *OAuthReturnResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OAuthReturnResponse.Merge(dst, src) } -func (m *ArchiveAccountRequest) XXX_Size() int { +func (m *OAuthReturnResponse) XXX_Size() int { return m.Size() } -func (m *ArchiveAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ArchiveAccountRequest.DiscardUnknown(m) +func (m *OAuthReturnResponse) XXX_DiscardUnknown() { + xxx_messageInfo_OAuthReturnResponse.DiscardUnknown(m) } -var xxx_messageInfo_ArchiveAccountRequest proto.InternalMessageInfo +var xxx_messageInfo_OAuthReturnResponse proto.InternalMessageInfo -func (m *ArchiveAccountRequest) GetId() string { +func (m *OAuthReturnResponse) GetRedirect() string { if m != nil { - return m.Id + return m.Redirect } return "" } -type ImportAccountRequst struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type Configuration struct { + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + ResponseTypesSupported []string `protobuf:"bytes,2,rep,name=response_types_supported,json=responseTypesSupported" json:"response_types_supported,omitempty"` + SubjectTypesSupported []string `protobuf:"bytes,3,rep,name=subject_types_supported,json=subjectTypesSupported" json:"subject_types_supported,omitempty"` + IdTokenSigningAlgValuesSupported []string `protobuf:"bytes,4,rep,name=id_token_signing_alg_values_supported,json=idTokenSigningAlgValuesSupported" json:"id_token_signing_alg_values_supported,omitempty"` + ClaimsSupported []string `protobuf:"bytes,5,rep,name=claims_supported,json=claimsSupported" json:"claims_supported,omitempty"` + JwksUri string `protobuf:"bytes,6,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ImportAccountRequst) Reset() { *m = ImportAccountRequst{} } -func (*ImportAccountRequst) ProtoMessage() {} -func (*ImportAccountRequst) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{12} +func (m *Configuration) Reset() { *m = Configuration{} } +func (*Configuration) ProtoMessage() {} +func (*Configuration) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{12} } -func (m *ImportAccountRequst) XXX_Unmarshal(b []byte) error { +func (m *Configuration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ImportAccountRequst) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ImportAccountRequst.Marshal(b, m, deterministic) + return xxx_messageInfo_Configuration.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -639,147 +642,79 @@ func (m *ImportAccountRequst) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *ImportAccountRequst) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportAccountRequst.Merge(dst, src) +func (dst *Configuration) XXX_Merge(src proto.Message) { + xxx_messageInfo_Configuration.Merge(dst, src) } -func (m *ImportAccountRequst) XXX_Size() int { +func (m *Configuration) XXX_Size() int { return m.Size() } -func (m *ImportAccountRequst) XXX_DiscardUnknown() { - xxx_messageInfo_ImportAccountRequst.DiscardUnknown(m) +func (m *Configuration) XXX_DiscardUnknown() { + xxx_messageInfo_Configuration.DiscardUnknown(m) } -var xxx_messageInfo_ImportAccountRequst proto.InternalMessageInfo +var xxx_messageInfo_Configuration proto.InternalMessageInfo -func (m *ImportAccountRequst) GetUsername() string { +func (m *Configuration) GetIssuer() string { if m != nil { - return m.Username + return m.Issuer } return "" } -func (m *ImportAccountRequst) GetPassword() string { +func (m *Configuration) GetResponseTypesSupported() []string { if m != nil { - return m.Password + return m.ResponseTypesSupported } - return "" + return nil } -func (m *ImportAccountRequst) GetLocked() bool { +func (m *Configuration) GetSubjectTypesSupported() []string { if m != nil { - return m.Locked - } - return false -} - -type ImportAccountResponse struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ImportAccountResponse) Reset() { *m = ImportAccountResponse{} } -func (*ImportAccountResponse) ProtoMessage() {} -func (*ImportAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{13} -} -func (m *ImportAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImportAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImportAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return m.SubjectTypesSupported } + return nil } -func (dst *ImportAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportAccountResponse.Merge(dst, src) -} -func (m *ImportAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *ImportAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ImportAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ImportAccountResponse proto.InternalMessageInfo -func (m *ImportAccountResponse) GetId() int64 { +func (m *Configuration) GetIdTokenSigningAlgValuesSupported() []string { if m != nil { - return m.Id + return m.IdTokenSigningAlgValuesSupported } - return 0 -} - -type ImportAccountResponseEnvelope struct { - Result *ImportAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + return nil } -func (m *ImportAccountResponseEnvelope) Reset() { *m = ImportAccountResponseEnvelope{} } -func (*ImportAccountResponseEnvelope) ProtoMessage() {} -func (*ImportAccountResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{14} -} -func (m *ImportAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImportAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImportAccountResponseEnvelope.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *Configuration) GetClaimsSupported() []string { + if m != nil { + return m.ClaimsSupported } -} -func (dst *ImportAccountResponseEnvelope) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportAccountResponseEnvelope.Merge(dst, src) -} -func (m *ImportAccountResponseEnvelope) XXX_Size() int { - return m.Size() -} -func (m *ImportAccountResponseEnvelope) XXX_DiscardUnknown() { - xxx_messageInfo_ImportAccountResponseEnvelope.DiscardUnknown(m) + return nil } -var xxx_messageInfo_ImportAccountResponseEnvelope proto.InternalMessageInfo - -func (m *ImportAccountResponseEnvelope) GetResult() *ImportAccountResponse { +func (m *Configuration) GetJwksUri() string { if m != nil { - return m.Result + return m.JwksUri } - return nil + return "" } -type LoginRequest struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` +type HealthCheckResponse struct { + Http bool `protobuf:"varint,1,opt,name=http,proto3" json:"http,omitempty"` + Db bool `protobuf:"varint,2,opt,name=db,proto3" json:"db,omitempty"` + Redis bool `protobuf:"varint,3,opt,name=redis,proto3" json:"redis,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *LoginRequest) Reset() { *m = LoginRequest{} } -func (*LoginRequest) ProtoMessage() {} -func (*LoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{15} +func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } +func (*HealthCheckResponse) ProtoMessage() {} +func (*HealthCheckResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{13} } -func (m *LoginRequest) XXX_Unmarshal(b []byte) error { +func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -789,49 +724,61 @@ func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *LoginRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoginRequest.Merge(dst, src) +func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheckResponse.Merge(dst, src) } -func (m *LoginRequest) XXX_Size() int { +func (m *HealthCheckResponse) XXX_Size() int { return m.Size() } -func (m *LoginRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LoginRequest.DiscardUnknown(m) +func (m *HealthCheckResponse) XXX_DiscardUnknown() { + xxx_messageInfo_HealthCheckResponse.DiscardUnknown(m) } -var xxx_messageInfo_LoginRequest proto.InternalMessageInfo +var xxx_messageInfo_HealthCheckResponse proto.InternalMessageInfo -func (m *LoginRequest) GetUsername() string { +func (m *HealthCheckResponse) GetHttp() bool { if m != nil { - return m.Username + return m.Http } - return "" + return false } -func (m *LoginRequest) GetPassword() string { +func (m *HealthCheckResponse) GetDb() bool { if m != nil { - return m.Password + return m.Db } - return "" + return false } -type PasswordResetRequest struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` +func (m *HealthCheckResponse) GetRedis() bool { + if m != nil { + return m.Redis + } + return false +} + +type Key struct { + Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"` + Alg []string `protobuf:"bytes,2,rep,name=alg" json:"alg,omitempty"` + Kty string `protobuf:"bytes,3,opt,name=kty,proto3" json:"kty,omitempty"` + Kid string `protobuf:"bytes,4,opt,name=kid,proto3" json:"kid,omitempty"` + E string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` + N string `protobuf:"bytes,6,opt,name=n,proto3" json:"n,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } -func (*PasswordResetRequest) ProtoMessage() {} -func (*PasswordResetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{16} +func (m *Key) Reset() { *m = Key{} } +func (*Key) ProtoMessage() {} +func (*Key) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{14} } -func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { +func (m *Key) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PasswordResetRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_Key.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -841,103 +788,77 @@ func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (dst *PasswordResetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PasswordResetRequest.Merge(dst, src) +func (dst *Key) XXX_Merge(src proto.Message) { + xxx_messageInfo_Key.Merge(dst, src) } -func (m *PasswordResetRequest) XXX_Size() int { +func (m *Key) XXX_Size() int { return m.Size() } -func (m *PasswordResetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PasswordResetRequest.DiscardUnknown(m) +func (m *Key) XXX_DiscardUnknown() { + xxx_messageInfo_Key.DiscardUnknown(m) } -var xxx_messageInfo_PasswordResetRequest proto.InternalMessageInfo +var xxx_messageInfo_Key proto.InternalMessageInfo -func (m *PasswordResetRequest) GetUsername() string { +func (m *Key) GetUse() string { if m != nil { - return m.Username + return m.Use } return "" } -type ChangePasswordRequest struct { - Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - CurrentPassword string `protobuf:"bytes,3,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *Key) GetAlg() []string { + if m != nil { + return m.Alg + } + return nil } -func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } -func (*ChangePasswordRequest) ProtoMessage() {} -func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{17} -} -func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *Key) GetKty() string { + if m != nil { + return m.Kty } -} -func (dst *ChangePasswordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChangePasswordRequest.Merge(dst, src) -} -func (m *ChangePasswordRequest) XXX_Size() int { - return m.Size() -} -func (m *ChangePasswordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m) + return "" } -var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo - -func (m *ChangePasswordRequest) GetPassword() string { +func (m *Key) GetKid() string { if m != nil { - return m.Password + return m.Kid } return "" } -func (m *ChangePasswordRequest) GetToken() string { +func (m *Key) GetE() string { if m != nil { - return m.Token + return m.E } return "" } -func (m *ChangePasswordRequest) GetCurrentPassword() string { +func (m *Key) GetN() string { if m != nil { - return m.CurrentPassword + return m.N } return "" } -type ExpirePasswordRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type JWKSResponse struct { + Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *ExpirePasswordRequest) Reset() { *m = ExpirePasswordRequest{} } -func (*ExpirePasswordRequest) ProtoMessage() {} -func (*ExpirePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{18} +func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } +func (*JWKSResponse) ProtoMessage() {} +func (*JWKSResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{15} } -func (m *ExpirePasswordRequest) XXX_Unmarshal(b []byte) error { +func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ExpirePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *JWKSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ExpirePasswordRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_JWKSResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -947,564 +868,306 @@ func (m *ExpirePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (dst *ExpirePasswordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExpirePasswordRequest.Merge(dst, src) +func (dst *JWKSResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_JWKSResponse.Merge(dst, src) } -func (m *ExpirePasswordRequest) XXX_Size() int { +func (m *JWKSResponse) XXX_Size() int { return m.Size() } -func (m *ExpirePasswordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExpirePasswordRequest.DiscardUnknown(m) +func (m *JWKSResponse) XXX_DiscardUnknown() { + xxx_messageInfo_JWKSResponse.DiscardUnknown(m) } -var xxx_messageInfo_ExpirePasswordRequest proto.InternalMessageInfo +var xxx_messageInfo_JWKSResponse proto.InternalMessageInfo -func (m *ExpirePasswordRequest) GetId() string { +func (m *JWKSResponse) GetKeys() []*Key { if m != nil { - return m.Id + return m.Keys } - return "" + return nil } -type BeginOAuthRequest struct { - ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` - RedirectURI string `protobuf:"bytes,2,opt,name=redirectURI,proto3" json:"redirectURI,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +func init() { + proto.RegisterType((*SignupRequest)(nil), "grpc.SignupRequest") + proto.RegisterType((*SignupResponse)(nil), "grpc.SignupResponse") + proto.RegisterType((*SignupResponseEnvelope)(nil), "grpc.SignupResponseEnvelope") + proto.RegisterType((*IsUsernameAvailableRequest)(nil), "grpc.IsUsernameAvailableRequest") + proto.RegisterType((*IsUsernameAvailableResponseEnvelope)(nil), "grpc.IsUsernameAvailableResponseEnvelope") + proto.RegisterType((*LoginRequest)(nil), "grpc.LoginRequest") + proto.RegisterType((*PasswordResetRequest)(nil), "grpc.PasswordResetRequest") + proto.RegisterType((*ChangePasswordRequest)(nil), "grpc.ChangePasswordRequest") + proto.RegisterType((*BeginOAuthRequest)(nil), "grpc.BeginOAuthRequest") + proto.RegisterType((*BeginOAuthResponse)(nil), "grpc.BeginOAuthResponse") + proto.RegisterType((*OAuthReturnRequest)(nil), "grpc.OAuthReturnRequest") + proto.RegisterType((*OAuthReturnResponse)(nil), "grpc.OAuthReturnResponse") + proto.RegisterType((*Configuration)(nil), "grpc.Configuration") + proto.RegisterType((*HealthCheckResponse)(nil), "grpc.HealthCheckResponse") + proto.RegisterType((*Key)(nil), "grpc.Key") + proto.RegisterType((*JWKSResponse)(nil), "grpc.JWKSResponse") } +func (this *SignupRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *BeginOAuthRequest) Reset() { *m = BeginOAuthRequest{} } -func (*BeginOAuthRequest) ProtoMessage() {} -func (*BeginOAuthRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{19} -} -func (m *BeginOAuthRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeginOAuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeginOAuthRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*SignupRequest) + if !ok { + that2, ok := that.(SignupRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *BeginOAuthRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeginOAuthRequest.Merge(dst, src) -} -func (m *BeginOAuthRequest) XXX_Size() int { - return m.Size() -} -func (m *BeginOAuthRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BeginOAuthRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BeginOAuthRequest proto.InternalMessageInfo - -func (m *BeginOAuthRequest) GetProviderName() string { - if m != nil { - return m.ProviderName + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -func (m *BeginOAuthRequest) GetRedirectURI() string { - if m != nil { - return m.RedirectURI + if this.Username != that1.Username { + return false } - return "" -} - -type BeginOAuthResponse struct { - Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + if this.Password != that1.Password { + return false + } + return true } +func (this *SignupResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *BeginOAuthResponse) Reset() { *m = BeginOAuthResponse{} } -func (*BeginOAuthResponse) ProtoMessage() {} -func (*BeginOAuthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{20} -} -func (m *BeginOAuthResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeginOAuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeginOAuthResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*SignupResponse) + if !ok { + that2, ok := that.(SignupResponse) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *BeginOAuthResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeginOAuthResponse.Merge(dst, src) -} -func (m *BeginOAuthResponse) XXX_Size() int { - return m.Size() -} -func (m *BeginOAuthResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BeginOAuthResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BeginOAuthResponse proto.InternalMessageInfo - -func (m *BeginOAuthResponse) GetProvider() string { - if m != nil { - return m.Provider + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -type OAuthReturnRequest struct { - ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + if this.IdToken != that1.IdToken { + return false + } + return true } +func (this *SignupResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *OAuthReturnRequest) Reset() { *m = OAuthReturnRequest{} } -func (*OAuthReturnRequest) ProtoMessage() {} -func (*OAuthReturnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{21} -} -func (m *OAuthReturnRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OAuthReturnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OAuthReturnRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*SignupResponseEnvelope) + if !ok { + that2, ok := that.(SignupResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *OAuthReturnRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OAuthReturnRequest.Merge(dst, src) -} -func (m *OAuthReturnRequest) XXX_Size() int { - return m.Size() -} -func (m *OAuthReturnRequest) XXX_DiscardUnknown() { - xxx_messageInfo_OAuthReturnRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_OAuthReturnRequest proto.InternalMessageInfo - -func (m *OAuthReturnRequest) GetProviderName() string { - if m != nil { - return m.ProviderName + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -type OAuthReturnResponse struct { - Redirect string `protobuf:"bytes,1,opt,name=redirect,proto3" json:"redirect,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + if !this.Result.Equal(that1.Result) { + return false + } + return true } +func (this *IsUsernameAvailableRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *OAuthReturnResponse) Reset() { *m = OAuthReturnResponse{} } -func (*OAuthReturnResponse) ProtoMessage() {} -func (*OAuthReturnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{22} -} -func (m *OAuthReturnResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OAuthReturnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OAuthReturnResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*IsUsernameAvailableRequest) + if !ok { + that2, ok := that.(IsUsernameAvailableRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + return true } -func (dst *OAuthReturnResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OAuthReturnResponse.Merge(dst, src) -} -func (m *OAuthReturnResponse) XXX_Size() int { - return m.Size() -} -func (m *OAuthReturnResponse) XXX_DiscardUnknown() { - xxx_messageInfo_OAuthReturnResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_OAuthReturnResponse proto.InternalMessageInfo +func (this *IsUsernameAvailableResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *OAuthReturnResponse) GetRedirect() string { - if m != nil { - return m.Redirect + that1, ok := that.(*IsUsernameAvailableResponseEnvelope) + if !ok { + that2, ok := that.(IsUsernameAvailableResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } } - return "" + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Result != that1.Result { + return false + } + return true } +func (this *LoginRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -type Configuration struct { - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - ResponseTypesSupported []string `protobuf:"bytes,2,rep,name=response_types_supported,json=responseTypesSupported" json:"response_types_supported,omitempty"` - SubjectTypesSupported []string `protobuf:"bytes,3,rep,name=subject_types_supported,json=subjectTypesSupported" json:"subject_types_supported,omitempty"` - IdTokenSigningAlgValuesSupported []string `protobuf:"bytes,4,rep,name=id_token_signing_alg_values_supported,json=idTokenSigningAlgValuesSupported" json:"id_token_signing_alg_values_supported,omitempty"` - ClaimsSupported []string `protobuf:"bytes,5,rep,name=claims_supported,json=claimsSupported" json:"claims_supported,omitempty"` - JwksUri string `protobuf:"bytes,6,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Configuration) Reset() { *m = Configuration{} } -func (*Configuration) ProtoMessage() {} -func (*Configuration) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{23} -} -func (m *Configuration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Configuration.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*LoginRequest) + if !ok { + that2, ok := that.(LoginRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *Configuration) XXX_Merge(src proto.Message) { - xxx_messageInfo_Configuration.Merge(dst, src) -} -func (m *Configuration) XXX_Size() int { - return m.Size() -} -func (m *Configuration) XXX_DiscardUnknown() { - xxx_messageInfo_Configuration.DiscardUnknown(m) -} - -var xxx_messageInfo_Configuration proto.InternalMessageInfo - -func (m *Configuration) GetIssuer() string { - if m != nil { - return m.Issuer + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -func (m *Configuration) GetResponseTypesSupported() []string { - if m != nil { - return m.ResponseTypesSupported + if this.Username != that1.Username { + return false } - return nil -} - -func (m *Configuration) GetSubjectTypesSupported() []string { - if m != nil { - return m.SubjectTypesSupported + if this.Password != that1.Password { + return false } - return nil + return true } - -func (m *Configuration) GetIdTokenSigningAlgValuesSupported() []string { - if m != nil { - return m.IdTokenSigningAlgValuesSupported +func (this *PasswordResetRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return nil -} -func (m *Configuration) GetClaimsSupported() []string { - if m != nil { - return m.ClaimsSupported + that1, ok := that.(*PasswordResetRequest) + if !ok { + that2, ok := that.(PasswordResetRequest) + if ok { + that1 = &that2 + } else { + return false + } } - return nil -} - -func (m *Configuration) GetJwksUri() string { - if m != nil { - return m.JwksUri + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -type ServiceStatsResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + if this.Username != that1.Username { + return false + } + return true } +func (this *ChangePasswordRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *ServiceStatsResponse) Reset() { *m = ServiceStatsResponse{} } -func (*ServiceStatsResponse) ProtoMessage() {} -func (*ServiceStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{24} -} -func (m *ServiceStatsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ServiceStatsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*ChangePasswordRequest) + if !ok { + that2, ok := that.(ChangePasswordRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Password != that1.Password { + return false + } + if this.Token != that1.Token { + return false + } + if this.CurrentPassword != that1.CurrentPassword { + return false + } + return true } -func (dst *ServiceStatsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceStatsResponse.Merge(dst, src) -} -func (m *ServiceStatsResponse) XXX_Size() int { - return m.Size() -} -func (m *ServiceStatsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceStatsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceStatsResponse proto.InternalMessageInfo - -type HealthCheckResponse struct { - Http bool `protobuf:"varint,1,opt,name=http,proto3" json:"http,omitempty"` - Db bool `protobuf:"varint,2,opt,name=db,proto3" json:"db,omitempty"` - Redis bool `protobuf:"varint,3,opt,name=redis,proto3" json:"redis,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} +func (this *BeginOAuthRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } -func (*HealthCheckResponse) ProtoMessage() {} -func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{25} -} -func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*BeginOAuthRequest) + if !ok { + that2, ok := that.(BeginOAuthRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HealthCheckResponse.Merge(dst, src) -} -func (m *HealthCheckResponse) XXX_Size() int { - return m.Size() -} -func (m *HealthCheckResponse) XXX_DiscardUnknown() { - xxx_messageInfo_HealthCheckResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_HealthCheckResponse proto.InternalMessageInfo - -func (m *HealthCheckResponse) GetHttp() bool { - if m != nil { - return m.Http + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return false -} - -func (m *HealthCheckResponse) GetDb() bool { - if m != nil { - return m.Db + if this.ProviderName != that1.ProviderName { + return false } - return false -} - -func (m *HealthCheckResponse) GetRedis() bool { - if m != nil { - return m.Redis + if this.RedirectURI != that1.RedirectURI { + return false } - return false + return true } +func (this *BeginOAuthResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -type Key struct { - Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"` - Alg []string `protobuf:"bytes,2,rep,name=alg" json:"alg,omitempty"` - Kty string `protobuf:"bytes,3,opt,name=kty,proto3" json:"kty,omitempty"` - Kid string `protobuf:"bytes,4,opt,name=kid,proto3" json:"kid,omitempty"` - E string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` - N string `protobuf:"bytes,6,opt,name=n,proto3" json:"n,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + that1, ok := that.(*BeginOAuthResponse) + if !ok { + that2, ok := that.(BeginOAuthResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Provider != that1.Provider { + return false + } + return true } +func (this *OAuthReturnRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *Key) Reset() { *m = Key{} } -func (*Key) ProtoMessage() {} -func (*Key) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{26} -} -func (m *Key) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Key.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Key) XXX_Merge(src proto.Message) { - xxx_messageInfo_Key.Merge(dst, src) -} -func (m *Key) XXX_Size() int { - return m.Size() -} -func (m *Key) XXX_DiscardUnknown() { - xxx_messageInfo_Key.DiscardUnknown(m) -} - -var xxx_messageInfo_Key proto.InternalMessageInfo - -func (m *Key) GetUse() string { - if m != nil { - return m.Use - } - return "" -} - -func (m *Key) GetAlg() []string { - if m != nil { - return m.Alg - } - return nil -} - -func (m *Key) GetKty() string { - if m != nil { - return m.Kty - } - return "" -} - -func (m *Key) GetKid() string { - if m != nil { - return m.Kid - } - return "" -} - -func (m *Key) GetE() string { - if m != nil { - return m.E - } - return "" -} - -func (m *Key) GetN() string { - if m != nil { - return m.N - } - return "" -} - -type JWKSResponse struct { - Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } -func (*JWKSResponse) ProtoMessage() {} -func (*JWKSResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{27} -} -func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JWKSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JWKSResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *JWKSResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_JWKSResponse.Merge(dst, src) -} -func (m *JWKSResponse) XXX_Size() int { - return m.Size() -} -func (m *JWKSResponse) XXX_DiscardUnknown() { - xxx_messageInfo_JWKSResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_JWKSResponse proto.InternalMessageInfo - -func (m *JWKSResponse) GetKeys() []*Key { - if m != nil { - return m.Keys - } - return nil -} - -func init() { - proto.RegisterType((*SignupRequest)(nil), "grpc.SignupRequest") - proto.RegisterType((*SignupResponse)(nil), "grpc.SignupResponse") - proto.RegisterType((*SignupResponseEnvelope)(nil), "grpc.SignupResponseEnvelope") - proto.RegisterType((*GetAccountRequest)(nil), "grpc.GetAccountRequest") - proto.RegisterType((*GetAccountResponse)(nil), "grpc.GetAccountResponse") - proto.RegisterType((*GetAccountResponseEnvelope)(nil), "grpc.GetAccountResponseEnvelope") - proto.RegisterType((*UpdateAccountRequest)(nil), "grpc.UpdateAccountRequest") - proto.RegisterType((*IsUsernameAvailableRequest)(nil), "grpc.IsUsernameAvailableRequest") - proto.RegisterType((*IsUsernameAvailableResponseEnvelope)(nil), "grpc.IsUsernameAvailableResponseEnvelope") - proto.RegisterType((*LockAccountRequest)(nil), "grpc.LockAccountRequest") - proto.RegisterType((*UnlockAccountRequest)(nil), "grpc.UnlockAccountRequest") - proto.RegisterType((*ArchiveAccountRequest)(nil), "grpc.ArchiveAccountRequest") - proto.RegisterType((*ImportAccountRequst)(nil), "grpc.ImportAccountRequst") - proto.RegisterType((*ImportAccountResponse)(nil), "grpc.ImportAccountResponse") - proto.RegisterType((*ImportAccountResponseEnvelope)(nil), "grpc.ImportAccountResponseEnvelope") - proto.RegisterType((*LoginRequest)(nil), "grpc.LoginRequest") - proto.RegisterType((*PasswordResetRequest)(nil), "grpc.PasswordResetRequest") - proto.RegisterType((*ChangePasswordRequest)(nil), "grpc.ChangePasswordRequest") - proto.RegisterType((*ExpirePasswordRequest)(nil), "grpc.ExpirePasswordRequest") - proto.RegisterType((*BeginOAuthRequest)(nil), "grpc.BeginOAuthRequest") - proto.RegisterType((*BeginOAuthResponse)(nil), "grpc.BeginOAuthResponse") - proto.RegisterType((*OAuthReturnRequest)(nil), "grpc.OAuthReturnRequest") - proto.RegisterType((*OAuthReturnResponse)(nil), "grpc.OAuthReturnResponse") - proto.RegisterType((*Configuration)(nil), "grpc.Configuration") - proto.RegisterType((*ServiceStatsResponse)(nil), "grpc.ServiceStatsResponse") - proto.RegisterType((*HealthCheckResponse)(nil), "grpc.HealthCheckResponse") - proto.RegisterType((*Key)(nil), "grpc.Key") - proto.RegisterType((*JWKSResponse)(nil), "grpc.JWKSResponse") -} -func (this *SignupRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SignupRequest) + that1, ok := that.(*OAuthReturnRequest) if !ok { - that2, ok := that.(SignupRequest) + that2, ok := that.(OAuthReturnRequest) if ok { that1 = &that2 } else { @@ -1516,22 +1179,19 @@ func (this *SignupRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Username != that1.Username { - return false - } - if this.Password != that1.Password { + if this.ProviderName != that1.ProviderName { return false } return true } -func (this *SignupResponse) Equal(that interface{}) bool { +func (this *OAuthReturnResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*SignupResponse) + that1, ok := that.(*OAuthReturnResponse) if !ok { - that2, ok := that.(SignupResponse) + that2, ok := that.(OAuthReturnResponse) if ok { that1 = &that2 } else { @@ -1543,19 +1203,19 @@ func (this *SignupResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if this.IdToken != that1.IdToken { + if this.Redirect != that1.Redirect { return false } return true } -func (this *SignupResponseEnvelope) Equal(that interface{}) bool { +func (this *Configuration) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*SignupResponseEnvelope) + that1, ok := that.(*Configuration) if !ok { - that2, ok := that.(SignupResponseEnvelope) + that2, ok := that.(Configuration) if ok { that1 = &that2 } else { @@ -1567,43 +1227,54 @@ func (this *SignupResponseEnvelope) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.Result.Equal(that1.Result) { + if this.Issuer != that1.Issuer { return false } - return true -} -func (this *GetAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + if len(this.ResponseTypesSupported) != len(that1.ResponseTypesSupported) { + return false } - - that1, ok := that.(*GetAccountRequest) - if !ok { - that2, ok := that.(GetAccountRequest) - if ok { - that1 = &that2 - } else { + for i := range this.ResponseTypesSupported { + if this.ResponseTypesSupported[i] != that1.ResponseTypesSupported[i] { return false } } - if that1 == nil { - return this == nil - } else if this == nil { + if len(this.SubjectTypesSupported) != len(that1.SubjectTypesSupported) { + return false + } + for i := range this.SubjectTypesSupported { + if this.SubjectTypesSupported[i] != that1.SubjectTypesSupported[i] { + return false + } + } + if len(this.IdTokenSigningAlgValuesSupported) != len(that1.IdTokenSigningAlgValuesSupported) { + return false + } + for i := range this.IdTokenSigningAlgValuesSupported { + if this.IdTokenSigningAlgValuesSupported[i] != that1.IdTokenSigningAlgValuesSupported[i] { + return false + } + } + if len(this.ClaimsSupported) != len(that1.ClaimsSupported) { return false } - if this.Id != that1.Id { + for i := range this.ClaimsSupported { + if this.ClaimsSupported[i] != that1.ClaimsSupported[i] { + return false + } + } + if this.JwksUri != that1.JwksUri { return false } return true } -func (this *GetAccountResponse) Equal(that interface{}) bool { +func (this *HealthCheckResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*GetAccountResponse) + that1, ok := that.(*HealthCheckResponse) if !ok { - that2, ok := that.(GetAccountResponse) + that2, ok := that.(HealthCheckResponse) if ok { that1 = &that2 } else { @@ -1615,28 +1286,25 @@ func (this *GetAccountResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Id != that1.Id { - return false - } - if this.Username != that1.Username { + if this.Http != that1.Http { return false } - if this.Locked != that1.Locked { + if this.Db != that1.Db { return false } - if this.Deleted != that1.Deleted { + if this.Redis != that1.Redis { return false } return true } -func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { +func (this *Key) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*GetAccountResponseEnvelope) + that1, ok := that.(*Key) if !ok { - that2, ok := that.(GetAccountResponseEnvelope) + that2, ok := that.(Key) if ok { that1 = &that2 } else { @@ -1648,46 +1316,39 @@ func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.Result.Equal(that1.Result) { + if this.Use != that1.Use { return false } - return true -} -func (this *UpdateAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + if len(this.Alg) != len(that1.Alg) { + return false } - - that1, ok := that.(*UpdateAccountRequest) - if !ok { - that2, ok := that.(UpdateAccountRequest) - if ok { - that1 = &that2 - } else { + for i := range this.Alg { + if this.Alg[i] != that1.Alg[i] { return false } } - if that1 == nil { - return this == nil - } else if this == nil { + if this.Kty != that1.Kty { + return false + } + if this.Kid != that1.Kid { return false } - if this.Id != that1.Id { + if this.E != that1.E { return false } - if this.Username != that1.Username { + if this.N != that1.N { return false } return true } -func (this *IsUsernameAvailableRequest) Equal(that interface{}) bool { +func (this *JWKSResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*IsUsernameAvailableRequest) + that1, ok := that.(*JWKSResponse) if !ok { - that2, ok := that.(IsUsernameAvailableRequest) + that2, ok := that.(JWKSResponse) if ok { that1 = &that2 } else { @@ -1699,4047 +1360,1642 @@ func (this *IsUsernameAvailableRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Username != that1.Username { + if len(this.Keys) != len(that1.Keys) { return false } + for i := range this.Keys { + if !this.Keys[i].Equal(that1.Keys[i]) { + return false + } + } return true } -func (this *IsUsernameAvailableResponseEnvelope) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*IsUsernameAvailableResponseEnvelope) - if !ok { - that2, ok := that.(IsUsernameAvailableResponseEnvelope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Result != that1.Result { - return false +func (this *SignupRequest) GoString() string { + if this == nil { + return "nil" } - return true + s := make([]string, 0, 6) + s = append(s, "&grpc.SignupRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *LockAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LockAccountRequest) - if !ok { - that2, ok := that.(LockAccountRequest) - if ok { - that1 = &that2 - } else { - return false - } +func (this *SignupResponse) GoString() string { + if this == nil { + return "nil" } - if that1 == nil { - return this == nil - } else if this == nil { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.SignupResponse{") + s = append(s, "IdToken: "+fmt.Sprintf("%#v", this.IdToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SignupResponseEnvelope) GoString() string { + if this == nil { + return "nil" } - if this.Id != that1.Id { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.SignupResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") } - return true + s = append(s, "}") + return strings.Join(s, "") } -func (this *UnlockAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (this *IsUsernameAvailableRequest) GoString() string { + if this == nil { + return "nil" } - - that1, ok := that.(*UnlockAccountRequest) - if !ok { - that2, ok := that.(UnlockAccountRequest) - if ok { - that1 = &that2 - } else { - return false - } + s := make([]string, 0, 5) + s = append(s, "&grpc.IsUsernameAvailableRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *IsUsernameAvailableResponseEnvelope) GoString() string { + if this == nil { + return "nil" } - if that1 == nil { - return this == nil - } else if this == nil { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.IsUsernameAvailableResponseEnvelope{") + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *LoginRequest) GoString() string { + if this == nil { + return "nil" } - if this.Id != that1.Id { - return false + s := make([]string, 0, 6) + s = append(s, "&grpc.LoginRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *PasswordResetRequest) GoString() string { + if this == nil { + return "nil" } - return true + s := make([]string, 0, 5) + s = append(s, "&grpc.PasswordResetRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *ArchiveAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (this *ChangePasswordRequest) GoString() string { + if this == nil { + return "nil" } - - that1, ok := that.(*ArchiveAccountRequest) - if !ok { - that2, ok := that.(ArchiveAccountRequest) - if ok { - that1 = &that2 - } else { - return false - } + s := make([]string, 0, 7) + s = append(s, "&grpc.ChangePasswordRequest{") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "Token: "+fmt.Sprintf("%#v", this.Token)+",\n") + s = append(s, "CurrentPassword: "+fmt.Sprintf("%#v", this.CurrentPassword)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BeginOAuthRequest) GoString() string { + if this == nil { + return "nil" } - if that1 == nil { - return this == nil - } else if this == nil { - return false + s := make([]string, 0, 6) + s = append(s, "&grpc.BeginOAuthRequest{") + s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") + s = append(s, "RedirectURI: "+fmt.Sprintf("%#v", this.RedirectURI)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BeginOAuthResponse) GoString() string { + if this == nil { + return "nil" } - if this.Id != that1.Id { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.BeginOAuthResponse{") + s = append(s, "Provider: "+fmt.Sprintf("%#v", this.Provider)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OAuthReturnRequest) GoString() string { + if this == nil { + return "nil" } - return true + s := make([]string, 0, 5) + s = append(s, "&grpc.OAuthReturnRequest{") + s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *ImportAccountRequst) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (this *OAuthReturnResponse) GoString() string { + if this == nil { + return "nil" } - - that1, ok := that.(*ImportAccountRequst) - if !ok { - that2, ok := that.(ImportAccountRequst) - if ok { - that1 = &that2 - } else { - return false - } + s := make([]string, 0, 5) + s = append(s, "&grpc.OAuthReturnResponse{") + s = append(s, "Redirect: "+fmt.Sprintf("%#v", this.Redirect)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Configuration) GoString() string { + if this == nil { + return "nil" } - if that1 == nil { - return this == nil - } else if this == nil { - return false + s := make([]string, 0, 10) + s = append(s, "&grpc.Configuration{") + s = append(s, "Issuer: "+fmt.Sprintf("%#v", this.Issuer)+",\n") + s = append(s, "ResponseTypesSupported: "+fmt.Sprintf("%#v", this.ResponseTypesSupported)+",\n") + s = append(s, "SubjectTypesSupported: "+fmt.Sprintf("%#v", this.SubjectTypesSupported)+",\n") + s = append(s, "IdTokenSigningAlgValuesSupported: "+fmt.Sprintf("%#v", this.IdTokenSigningAlgValuesSupported)+",\n") + s = append(s, "ClaimsSupported: "+fmt.Sprintf("%#v", this.ClaimsSupported)+",\n") + s = append(s, "JwksUri: "+fmt.Sprintf("%#v", this.JwksUri)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *HealthCheckResponse) GoString() string { + if this == nil { + return "nil" } - if this.Username != that1.Username { - return false + s := make([]string, 0, 7) + s = append(s, "&grpc.HealthCheckResponse{") + s = append(s, "Http: "+fmt.Sprintf("%#v", this.Http)+",\n") + s = append(s, "Db: "+fmt.Sprintf("%#v", this.Db)+",\n") + s = append(s, "Redis: "+fmt.Sprintf("%#v", this.Redis)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Key) GoString() string { + if this == nil { + return "nil" } - if this.Password != that1.Password { - return false + s := make([]string, 0, 10) + s = append(s, "&grpc.Key{") + s = append(s, "Use: "+fmt.Sprintf("%#v", this.Use)+",\n") + s = append(s, "Alg: "+fmt.Sprintf("%#v", this.Alg)+",\n") + s = append(s, "Kty: "+fmt.Sprintf("%#v", this.Kty)+",\n") + s = append(s, "Kid: "+fmt.Sprintf("%#v", this.Kid)+",\n") + s = append(s, "E: "+fmt.Sprintf("%#v", this.E)+",\n") + s = append(s, "N: "+fmt.Sprintf("%#v", this.N)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *JWKSResponse) GoString() string { + if this == nil { + return "nil" } - if this.Locked != that1.Locked { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.JWKSResponse{") + if this.Keys != nil { + s = append(s, "Keys: "+fmt.Sprintf("%#v", this.Keys)+",\n") } - return true + s = append(s, "}") + return strings.Join(s, "") } -func (this *ImportAccountResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil +func valueToGoStringAuthn(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} - that1, ok := that.(*ImportAccountResponse) - if !ok { - that2, ok := that.(ImportAccountResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// PublicAuthNClient is the client API for PublicAuthN service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PublicAuthNClient interface { + Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) + IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) + Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) + RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) + Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) + RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) + ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) + BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) + OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) + ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) + JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) + HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) +} + +type publicAuthNClient struct { + cc *grpc.ClientConn +} + +func NewPublicAuthNClient(cc *grpc.ClientConn) PublicAuthNClient { + return &publicAuthNClient{cc} +} + +func (c *publicAuthNClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { + out := new(SignupResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Signup", in, out, opts...) + if err != nil { + return nil, err } - if this.Id != that1.Id { - return false + return out, nil +} + +func (c *publicAuthNClient) IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) { + out := new(IsUsernameAvailableResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/IsUsernameAvailable", in, out, opts...) + if err != nil { + return nil, err } - return true + return out, nil } -func (this *ImportAccountResponseEnvelope) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (c *publicAuthNClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) { + out := new(SignupResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Login", in, out, opts...) + if err != nil { + return nil, err } + return out, nil +} - that1, ok := that.(*ImportAccountResponseEnvelope) - if !ok { - that2, ok := that.(ImportAccountResponseEnvelope) - if ok { - that1 = &that2 - } else { - return false - } +func (c *publicAuthNClient) RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) { + out := new(SignupResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RefreshSession", in, out, opts...) + if err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + return out, nil +} + +func (c *publicAuthNClient) Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Logout", in, out, opts...) + if err != nil { + return nil, err } - if !this.Result.Equal(that1.Result) { - return false + return out, nil +} + +func (c *publicAuthNClient) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RequestPasswordReset", in, out, opts...) + if err != nil { + return nil, err } - return true + return out, nil } -func (this *LoginRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (c *publicAuthNClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) { + out := new(SignupResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/ChangePassword", in, out, opts...) + if err != nil { + return nil, err } + return out, nil +} - that1, ok := that.(*LoginRequest) - if !ok { - that2, ok := that.(LoginRequest) - if ok { - that1 = &that2 - } else { - return false - } +func (c *publicAuthNClient) BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) { + out := new(BeginOAuthResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/BeginOAuth", in, out, opts...) + if err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + return out, nil +} + +func (c *publicAuthNClient) OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) { + out := new(OAuthReturnResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/OAuthReturn", in, out, opts...) + if err != nil { + return nil, err } - if this.Username != that1.Username { - return false + return out, nil +} + +func (c *publicAuthNClient) ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) { + out := new(Configuration) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/ServiceConfiguration", in, out, opts...) + if err != nil { + return nil, err } - if this.Password != that1.Password { - return false + return out, nil +} + +func (c *publicAuthNClient) JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) { + out := new(JWKSResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/JWKS", in, out, opts...) + if err != nil { + return nil, err } - return true + return out, nil } -func (this *PasswordResetRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (c *publicAuthNClient) HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) { + out := new(HealthCheckResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/HealthCheck", in, out, opts...) + if err != nil { + return nil, err } + return out, nil +} - that1, ok := that.(*PasswordResetRequest) - if !ok { - that2, ok := that.(PasswordResetRequest) - if ok { - that1 = &that2 - } else { - return false - } +// PublicAuthNServer is the server API for PublicAuthN service. +type PublicAuthNServer interface { + Signup(context.Context, *SignupRequest) (*SignupResponseEnvelope, error) + IsUsernameAvailable(context.Context, *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) + Login(context.Context, *LoginRequest) (*SignupResponse, error) + RefreshSession(context.Context, *types.Empty) (*SignupResponse, error) + Logout(context.Context, *types.Empty) (*types.Empty, error) + RequestPasswordReset(context.Context, *PasswordResetRequest) (*types.Empty, error) + ChangePassword(context.Context, *ChangePasswordRequest) (*SignupResponse, error) + BeginOAuth(context.Context, *BeginOAuthRequest) (*BeginOAuthResponse, error) + OAuthReturn(context.Context, *OAuthReturnRequest) (*OAuthReturnResponse, error) + ServiceConfiguration(context.Context, *types.Empty) (*Configuration, error) + JWKS(context.Context, *types.Empty) (*JWKSResponse, error) + HealthCheck(context.Context, *types.Empty) (*HealthCheckResponse, error) +} + +func RegisterPublicAuthNServer(s *grpc.Server, srv PublicAuthNServer) { + s.RegisterService(&_PublicAuthN_serviceDesc, srv) +} + +func _PublicAuthN_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 that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).Signup(ctx, in) } - if this.Username != that1.Username { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/Signup", } - return true -} -func (this *ChangePasswordRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).Signup(ctx, req.(*SignupRequest)) } + return interceptor(ctx, in, info, handler) +} - that1, ok := that.(*ChangePasswordRequest) - if !ok { - that2, ok := that.(ChangePasswordRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false +func _PublicAuthN_IsUsernameAvailable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsUsernameAvailableRequest) + if err := dec(in); err != nil { + return nil, err } - if this.Password != that1.Password { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).IsUsernameAvailable(ctx, in) } - if this.Token != that1.Token { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/IsUsernameAvailable", } - if this.CurrentPassword != that1.CurrentPassword { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).IsUsernameAvailable(ctx, req.(*IsUsernameAvailableRequest)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *ExpirePasswordRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*ExpirePasswordRequest) - if !ok { - that2, ok := that.(ExpirePasswordRequest) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_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 that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).Login(ctx, in) } - if this.Id != that1.Id { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/Login", } - return true -} -func (this *BeginOAuthRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).Login(ctx, req.(*LoginRequest)) } + return interceptor(ctx, in, info, handler) +} - that1, ok := that.(*BeginOAuthRequest) - if !ok { - that2, ok := that.(BeginOAuthRequest) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_RefreshSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).RefreshSession(ctx, in) } - if this.ProviderName != that1.ProviderName { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/RefreshSession", } - if this.RedirectURI != that1.RedirectURI { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).RefreshSession(ctx, req.(*types.Empty)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *BeginOAuthResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*BeginOAuthResponse) - if !ok { - that2, ok := that.(BeginOAuthResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Provider != that1.Provider { - return false - } - return true -} -func (this *OAuthReturnRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func _PublicAuthN_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - - that1, ok := that.(*OAuthReturnRequest) - if !ok { - that2, ok := that.(OAuthReturnRequest) - if ok { - that1 = &that2 - } else { - return false - } + if interceptor == nil { + return srv.(PublicAuthNServer).Logout(ctx, in) } - if that1 == nil { - return this == nil - } else if this == nil { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/Logout", } - if this.ProviderName != that1.ProviderName { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).Logout(ctx, req.(*types.Empty)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *OAuthReturnResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*OAuthReturnResponse) - if !ok { - that2, ok := that.(OAuthReturnResponse) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_RequestPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PasswordResetRequest) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).RequestPasswordReset(ctx, in) } - if this.Redirect != that1.Redirect { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/RequestPasswordReset", } - return true -} -func (this *Configuration) Equal(that interface{}) bool { - if that == nil { - return this == nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).RequestPasswordReset(ctx, req.(*PasswordResetRequest)) } + return interceptor(ctx, in, info, handler) +} - that1, ok := that.(*Configuration) - if !ok { - that2, ok := that.(Configuration) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangePasswordRequest) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).ChangePassword(ctx, in) } - if this.Issuer != that1.Issuer { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/ChangePassword", } - if len(this.ResponseTypesSupported) != len(that1.ResponseTypesSupported) { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) } - for i := range this.ResponseTypesSupported { - if this.ResponseTypesSupported[i] != that1.ResponseTypesSupported[i] { - return false - } + return interceptor(ctx, in, info, handler) +} + +func _PublicAuthN_BeginOAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BeginOAuthRequest) + if err := dec(in); err != nil { + return nil, err } - if len(this.SubjectTypesSupported) != len(that1.SubjectTypesSupported) { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).BeginOAuth(ctx, in) } - for i := range this.SubjectTypesSupported { - if this.SubjectTypesSupported[i] != that1.SubjectTypesSupported[i] { - return false - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/BeginOAuth", } - if len(this.IdTokenSigningAlgValuesSupported) != len(that1.IdTokenSigningAlgValuesSupported) { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).BeginOAuth(ctx, req.(*BeginOAuthRequest)) } - for i := range this.IdTokenSigningAlgValuesSupported { - if this.IdTokenSigningAlgValuesSupported[i] != that1.IdTokenSigningAlgValuesSupported[i] { - return false - } + return interceptor(ctx, in, info, handler) +} + +func _PublicAuthN_OAuthReturn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OAuthReturnRequest) + if err := dec(in); err != nil { + return nil, err } - if len(this.ClaimsSupported) != len(that1.ClaimsSupported) { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).OAuthReturn(ctx, in) } - for i := range this.ClaimsSupported { - if this.ClaimsSupported[i] != that1.ClaimsSupported[i] { - return false - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/OAuthReturn", } - if this.JwksUri != that1.JwksUri { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).OAuthReturn(ctx, req.(*OAuthReturnRequest)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *ServiceStatsResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*ServiceStatsResponse) - if !ok { - that2, ok := that.(ServiceStatsResponse) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_ServiceConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).ServiceConfiguration(ctx, in) } - return true -} -func (this *HealthCheckResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/ServiceConfiguration", } - - that1, ok := that.(*HealthCheckResponse) - if !ok { - that2, ok := that.(HealthCheckResponse) - if ok { - that1 = &that2 - } else { - return false - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).ServiceConfiguration(ctx, req.(*types.Empty)) } - if that1 == nil { - return this == nil - } else if this == nil { - return false + return interceptor(ctx, in, info, handler) +} + +func _PublicAuthN_JWKS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - if this.Http != that1.Http { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).JWKS(ctx, in) } - if this.Db != that1.Db { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/JWKS", } - if this.Redis != that1.Redis { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).JWKS(ctx, req.(*types.Empty)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *Key) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*Key) - if !ok { - that2, ok := that.(Key) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Use != that1.Use { - return false - } - if len(this.Alg) != len(that1.Alg) { - return false +func _PublicAuthN_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - for i := range this.Alg { - if this.Alg[i] != that1.Alg[i] { - return false - } + if interceptor == nil { + return srv.(PublicAuthNServer).HealthCheck(ctx, in) } - if this.Kty != that1.Kty { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/HealthCheck", } - if this.Kid != that1.Kid { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).HealthCheck(ctx, req.(*types.Empty)) } - if this.E != that1.E { - return false - } - if this.N != that1.N { - return false - } - return true + return interceptor(ctx, in, info, handler) } -func (this *JWKSResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*JWKSResponse) - if !ok { - that2, ok := that.(JWKSResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false +var _PublicAuthN_serviceDesc = grpc.ServiceDesc{ + ServiceName: "grpc.PublicAuthN", + HandlerType: (*PublicAuthNServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Signup", + Handler: _PublicAuthN_Signup_Handler, + }, + { + MethodName: "IsUsernameAvailable", + Handler: _PublicAuthN_IsUsernameAvailable_Handler, + }, + { + MethodName: "Login", + Handler: _PublicAuthN_Login_Handler, + }, + { + MethodName: "RefreshSession", + Handler: _PublicAuthN_RefreshSession_Handler, + }, + { + MethodName: "Logout", + Handler: _PublicAuthN_Logout_Handler, + }, + { + MethodName: "RequestPasswordReset", + Handler: _PublicAuthN_RequestPasswordReset_Handler, + }, + { + MethodName: "ChangePassword", + Handler: _PublicAuthN_ChangePassword_Handler, + }, + { + MethodName: "BeginOAuth", + Handler: _PublicAuthN_BeginOAuth_Handler, + }, + { + MethodName: "OAuthReturn", + Handler: _PublicAuthN_OAuthReturn_Handler, + }, + { + MethodName: "ServiceConfiguration", + Handler: _PublicAuthN_ServiceConfiguration_Handler, + }, + { + MethodName: "JWKS", + Handler: _PublicAuthN_JWKS_Handler, + }, + { + MethodName: "HealthCheck", + Handler: _PublicAuthN_HealthCheck_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn.proto", +} + +func (m *SignupRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - if len(this.Keys) != len(that1.Keys) { - return false + return dAtA[:n], nil +} + +func (m *SignupRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - for i := range this.Keys { - if !this.Keys[i].Equal(that1.Keys[i]) { - return false - } + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) } - return true + return i, nil } -func (this *SignupRequest) GoString() string { - if this == nil { - return "nil" + +func (m *SignupResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 6) - s = append(s, "&grpc.SignupRequest{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *SignupResponse) GoString() string { - if this == nil { - return "nil" + +func (m *SignupResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.IdToken) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.IdToken))) + i += copy(dAtA[i:], m.IdToken) } - s := make([]string, 0, 5) - s = append(s, "&grpc.SignupResponse{") - s = append(s, "IdToken: "+fmt.Sprintf("%#v", this.IdToken)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *SignupResponseEnvelope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&grpc.SignupResponseEnvelope{") - if this.Result != nil { - s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + +func (m *SignupResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *GetAccountRequest) GoString() string { - if this == nil { - return "nil" + +func (m *SignupResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) + n1, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 } - s := make([]string, 0, 5) - s = append(s, "&grpc.GetAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *GetAccountResponse) GoString() string { - if this == nil { - return "nil" + +func (m *IsUsernameAvailableRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 8) - s = append(s, "&grpc.GetAccountResponse{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") - s = append(s, "Deleted: "+fmt.Sprintf("%#v", this.Deleted)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *GetAccountResponseEnvelope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&grpc.GetAccountResponseEnvelope{") - if this.Result != nil { - s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + +func (m *IsUsernameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *UpdateAccountRequest) GoString() string { - if this == nil { - return "nil" + +func (m *IsUsernameAvailableResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 6) - s = append(s, "&grpc.UpdateAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *IsUsernameAvailableRequest) GoString() string { - if this == nil { - return "nil" + +func (m *IsUsernameAvailableResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result { + dAtA[i] = 0x8 + i++ + if m.Result { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ } - s := make([]string, 0, 5) - s = append(s, "&grpc.IsUsernameAvailableRequest{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *IsUsernameAvailableResponseEnvelope) GoString() string { - if this == nil { - return "nil" + +func (m *LoginRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.IsUsernameAvailableResponseEnvelope{") - s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *LockAccountRequest) GoString() string { - if this == nil { - return "nil" + +func (m *LoginRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - s := make([]string, 0, 5) - s = append(s, "&grpc.LockAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnlockAccountRequest) GoString() string { - if this == nil { - return "nil" + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) } - s := make([]string, 0, 5) - s = append(s, "&grpc.UnlockAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *ArchiveAccountRequest) GoString() string { - if this == nil { - return "nil" + +func (m *PasswordResetRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.ArchiveAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *ImportAccountRequst) GoString() string { - if this == nil { - return "nil" + +func (m *PasswordResetRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - s := make([]string, 0, 7) - s = append(s, "&grpc.ImportAccountRequst{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") - s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *ImportAccountResponse) GoString() string { - if this == nil { - return "nil" + +func (m *ChangePasswordRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.ImportAccountResponse{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *ImportAccountResponseEnvelope) GoString() string { - if this == nil { - return "nil" + +func (m *ChangePasswordRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Password) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) } - s := make([]string, 0, 5) - s = append(s, "&grpc.ImportAccountResponseEnvelope{") - if this.Result != nil { - s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + if len(m.Token) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) + i += copy(dAtA[i:], m.Token) } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *LoginRequest) GoString() string { - if this == nil { - return "nil" + if len(m.CurrentPassword) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.CurrentPassword))) + i += copy(dAtA[i:], m.CurrentPassword) } - s := make([]string, 0, 6) - s = append(s, "&grpc.LoginRequest{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *PasswordResetRequest) GoString() string { - if this == nil { - return "nil" + +func (m *BeginOAuthRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.PasswordResetRequest{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *ChangePasswordRequest) GoString() string { - if this == nil { - return "nil" + +func (m *BeginOAuthRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ProviderName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) + i += copy(dAtA[i:], m.ProviderName) } - s := make([]string, 0, 7) - s = append(s, "&grpc.ChangePasswordRequest{") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") - s = append(s, "Token: "+fmt.Sprintf("%#v", this.Token)+",\n") - s = append(s, "CurrentPassword: "+fmt.Sprintf("%#v", this.CurrentPassword)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ExpirePasswordRequest) GoString() string { - if this == nil { - return "nil" + if len(m.RedirectURI) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.RedirectURI))) + i += copy(dAtA[i:], m.RedirectURI) } - s := make([]string, 0, 5) - s = append(s, "&grpc.ExpirePasswordRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *BeginOAuthRequest) GoString() string { - if this == nil { - return "nil" + +func (m *BeginOAuthResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 6) - s = append(s, "&grpc.BeginOAuthRequest{") - s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") - s = append(s, "RedirectURI: "+fmt.Sprintf("%#v", this.RedirectURI)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *BeginOAuthResponse) GoString() string { - if this == nil { - return "nil" + +func (m *BeginOAuthResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Provider))) + i += copy(dAtA[i:], m.Provider) } - s := make([]string, 0, 5) - s = append(s, "&grpc.BeginOAuthResponse{") - s = append(s, "Provider: "+fmt.Sprintf("%#v", this.Provider)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *OAuthReturnRequest) GoString() string { - if this == nil { - return "nil" + +func (m *OAuthReturnRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.OAuthReturnRequest{") - s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *OAuthReturnResponse) GoString() string { - if this == nil { - return "nil" + +func (m *OAuthReturnRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ProviderName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) + i += copy(dAtA[i:], m.ProviderName) } - s := make([]string, 0, 5) - s = append(s, "&grpc.OAuthReturnResponse{") - s = append(s, "Redirect: "+fmt.Sprintf("%#v", this.Redirect)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *Configuration) GoString() string { - if this == nil { - return "nil" + +func (m *OAuthReturnResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 10) - s = append(s, "&grpc.Configuration{") - s = append(s, "Issuer: "+fmt.Sprintf("%#v", this.Issuer)+",\n") - s = append(s, "ResponseTypesSupported: "+fmt.Sprintf("%#v", this.ResponseTypesSupported)+",\n") - s = append(s, "SubjectTypesSupported: "+fmt.Sprintf("%#v", this.SubjectTypesSupported)+",\n") - s = append(s, "IdTokenSigningAlgValuesSupported: "+fmt.Sprintf("%#v", this.IdTokenSigningAlgValuesSupported)+",\n") - s = append(s, "ClaimsSupported: "+fmt.Sprintf("%#v", this.ClaimsSupported)+",\n") - s = append(s, "JwksUri: "+fmt.Sprintf("%#v", this.JwksUri)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ServiceStatsResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&grpc.ServiceStatsResponse{") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *HealthCheckResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&grpc.HealthCheckResponse{") - s = append(s, "Http: "+fmt.Sprintf("%#v", this.Http)+",\n") - s = append(s, "Db: "+fmt.Sprintf("%#v", this.Db)+",\n") - s = append(s, "Redis: "+fmt.Sprintf("%#v", this.Redis)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Key) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&grpc.Key{") - s = append(s, "Use: "+fmt.Sprintf("%#v", this.Use)+",\n") - s = append(s, "Alg: "+fmt.Sprintf("%#v", this.Alg)+",\n") - s = append(s, "Kty: "+fmt.Sprintf("%#v", this.Kty)+",\n") - s = append(s, "Kid: "+fmt.Sprintf("%#v", this.Kid)+",\n") - s = append(s, "E: "+fmt.Sprintf("%#v", this.E)+",\n") - s = append(s, "N: "+fmt.Sprintf("%#v", this.N)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *JWKSResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&grpc.JWKSResponse{") - if this.Keys != nil { - s = append(s, "Keys: "+fmt.Sprintf("%#v", this.Keys)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringAuthn(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// AuthNClient is the client API for AuthN service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AuthNClient interface { - Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) - GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) - UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) - LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) - Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) - RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) - Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) - RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) - ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) - ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) - BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) - OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) - ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) - JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) - ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) - ServerStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) - HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) -} - -type authNClient struct { - cc *grpc.ClientConn -} - -func NewAuthNClient(cc *grpc.ClientConn) AuthNClient { - return &authNClient{cc} + return dAtA[:n], nil } -func (c *authNClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { - out := new(SignupResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AuthN/Signup", in, out, opts...) - if err != nil { - return nil, err +func (m *OAuthReturnResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Redirect) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Redirect))) + i += copy(dAtA[i:], m.Redirect) } - return out, nil + return i, nil } -func (c *authNClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) { - out := new(GetAccountResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AuthN/GetAccount", in, out, opts...) +func (m *Configuration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *authNClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/UpdateAccount", in, out, opts...) - if err != nil { - return nil, err +func (m *Configuration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Issuer) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Issuer))) + i += copy(dAtA[i:], m.Issuer) } - return out, nil -} - -func (c *authNClient) IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) { - out := new(IsUsernameAvailableResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AuthN/IsUsernameAvailable", in, out, opts...) - if err != nil { - return nil, err + if len(m.ResponseTypesSupported) > 0 { + for _, s := range m.ResponseTypesSupported { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return out, nil -} - -func (c *authNClient) LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/LockAccount", in, out, opts...) - if err != nil { - return nil, err + if len(m.SubjectTypesSupported) > 0 { + for _, s := range m.SubjectTypesSupported { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return out, nil -} - -func (c *authNClient) UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/UnlockAcount", in, out, opts...) - if err != nil { - return nil, err + if len(m.IdTokenSigningAlgValuesSupported) > 0 { + for _, s := range m.IdTokenSigningAlgValuesSupported { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return out, nil + if len(m.ClaimsSupported) > 0 { + for _, s := range m.ClaimsSupported { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.JwksUri) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.JwksUri))) + i += copy(dAtA[i:], m.JwksUri) + } + return i, nil } -func (c *authNClient) ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ArchiveAccount", in, out, opts...) +func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *authNClient) ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) { - out := new(ImportAccountResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ImportAccount", in, out, opts...) - if err != nil { - return nil, err +func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Http { + dAtA[i] = 0x8 + i++ + if m.Http { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ } - return out, nil + if m.Db { + dAtA[i] = 0x10 + i++ + if m.Db { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Redis { + dAtA[i] = 0x18 + i++ + if m.Redis { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil } -func (c *authNClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) { - out := new(SignupResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/Login", in, out, opts...) +func (m *Key) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *authNClient) RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) { - out := new(SignupResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/RefreshSession", in, out, opts...) - if err != nil { - return nil, err +func (m *Key) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Use) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Use))) + i += copy(dAtA[i:], m.Use) } - return out, nil -} - -func (c *authNClient) Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/Logout", in, out, opts...) - if err != nil { - return nil, err + if len(m.Alg) > 0 { + for _, s := range m.Alg { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return out, nil -} - -func (c *authNClient) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/RequestPasswordReset", in, out, opts...) - if err != nil { - return nil, err + if len(m.Kty) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kty))) + i += copy(dAtA[i:], m.Kty) } - return out, nil -} - -func (c *authNClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) { - out := new(SignupResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ChangePassword", in, out, opts...) - if err != nil { - return nil, err + if len(m.Kid) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kid))) + i += copy(dAtA[i:], m.Kid) } - return out, nil + if len(m.E) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.E))) + i += copy(dAtA[i:], m.E) + } + if len(m.N) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.N))) + i += copy(dAtA[i:], m.N) + } + return i, nil } -func (c *authNClient) ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ExpirePassword", in, out, opts...) +func (m *JWKSResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *authNClient) BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) { - out := new(BeginOAuthResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/BeginOAuth", in, out, opts...) - if err != nil { - return nil, err +func (m *JWKSResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Keys) > 0 { + for _, msg := range m.Keys { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return out, nil + return i, nil } -func (c *authNClient) OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) { - out := new(OAuthReturnResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/OAuthReturn", in, out, opts...) - if err != nil { - return nil, err +func encodeVarintAuthn(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return out, nil + dAtA[offset] = uint8(v) + return offset + 1 } - -func (c *authNClient) ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) { - out := new(Configuration) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ServiceConfiguration", in, out, opts...) - if err != nil { - return nil, err +func (m *SignupRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return out, nil + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n } -func (c *authNClient) JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) { - out := new(JWKSResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/JWKS", in, out, opts...) - if err != nil { - return nil, err +func (m *SignupResponse) Size() (n int) { + var l int + _ = l + l = len(m.IdToken) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return out, nil + return n } -func (c *authNClient) ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) { - out := new(ServiceStatsResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ServiceStats", in, out, opts...) - if err != nil { - return nil, err +func (m *SignupResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthn(uint64(l)) } - return out, nil + return n } -func (c *authNClient) ServerStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ServerStats", in, out, opts...) - if err != nil { - return nil, err +func (m *IsUsernameAvailableRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return out, nil + return n } -func (c *authNClient) HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) { - out := new(HealthCheckResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/HealthCheck", in, out, opts...) - if err != nil { - return nil, err +func (m *IsUsernameAvailableResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result { + n += 2 } - return out, nil + return n } -// AuthNServer is the server API for AuthN service. -type AuthNServer interface { - Signup(context.Context, *SignupRequest) (*SignupResponseEnvelope, error) - GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponseEnvelope, error) - UpdateAccount(context.Context, *UpdateAccountRequest) (*types.Empty, error) - IsUsernameAvailable(context.Context, *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) - LockAccount(context.Context, *LockAccountRequest) (*types.Empty, error) - UnlockAcount(context.Context, *UnlockAccountRequest) (*types.Empty, error) - ArchiveAccount(context.Context, *ArchiveAccountRequest) (*types.Empty, error) - ImportAccount(context.Context, *ImportAccountRequst) (*ImportAccountResponseEnvelope, error) - Login(context.Context, *LoginRequest) (*SignupResponse, error) - RefreshSession(context.Context, *types.Empty) (*SignupResponse, error) - Logout(context.Context, *types.Empty) (*types.Empty, error) - RequestPasswordReset(context.Context, *PasswordResetRequest) (*types.Empty, error) - ChangePassword(context.Context, *ChangePasswordRequest) (*SignupResponse, error) - ExpirePassword(context.Context, *ExpirePasswordRequest) (*types.Empty, error) - BeginOAuth(context.Context, *BeginOAuthRequest) (*BeginOAuthResponse, error) - OAuthReturn(context.Context, *OAuthReturnRequest) (*OAuthReturnResponse, error) - ServiceConfiguration(context.Context, *types.Empty) (*Configuration, error) - JWKS(context.Context, *types.Empty) (*JWKSResponse, error) - ServiceStats(context.Context, *types.Empty) (*ServiceStatsResponse, error) - ServerStats(context.Context, *types.Empty) (*types.Empty, error) - HealthCheck(context.Context, *types.Empty) (*HealthCheckResponse, error) +func (m *LoginRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n } -func RegisterAuthNServer(s *grpc.Server, srv AuthNServer) { - s.RegisterService(&_AuthN_serviceDesc, srv) +func (m *PasswordResetRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n } -func _AuthN_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.(AuthNServer).Signup(ctx, in) +func (m *ChangePasswordRequest) Size() (n int) { + var l int + _ = l + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/Signup", + l = len(m.Token) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).Signup(ctx, req.(*SignupRequest)) + l = len(m.CurrentPassword) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/GetAccount", +func (m *BeginOAuthRequest) Size() (n int) { + var l int + _ = l + l = len(m.ProviderName) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).GetAccount(ctx, req.(*GetAccountRequest)) + l = len(m.RedirectURI) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).UpdateAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/UpdateAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).UpdateAccount(ctx, req.(*UpdateAccountRequest)) +func (m *BeginOAuthResponse) Size() (n int) { + var l int + _ = l + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_IsUsernameAvailable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsUsernameAvailableRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).IsUsernameAvailable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/IsUsernameAvailable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).IsUsernameAvailable(ctx, req.(*IsUsernameAvailableRequest)) +func (m *OAuthReturnRequest) Size() (n int) { + var l int + _ = l + l = len(m.ProviderName) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_LockAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LockAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).LockAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/LockAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).LockAccount(ctx, req.(*LockAccountRequest)) +func (m *OAuthReturnResponse) Size() (n int) { + var l int + _ = l + l = len(m.Redirect) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_UnlockAcount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnlockAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).UnlockAcount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/UnlockAcount", +func (m *Configuration) Size() (n int) { + var l int + _ = l + l = len(m.Issuer) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).UnlockAcount(ctx, req.(*UnlockAccountRequest)) + if len(m.ResponseTypesSupported) > 0 { + for _, s := range m.ResponseTypesSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_ArchiveAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveAccountRequest) - if err := dec(in); err != nil { - return nil, err + if len(m.SubjectTypesSupported) > 0 { + for _, s := range m.SubjectTypesSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - if interceptor == nil { - return srv.(AuthNServer).ArchiveAccount(ctx, in) + if len(m.IdTokenSigningAlgValuesSupported) > 0 { + for _, s := range m.IdTokenSigningAlgValuesSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ArchiveAccount", + if len(m.ClaimsSupported) > 0 { + for _, s := range m.ClaimsSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ArchiveAccount(ctx, req.(*ArchiveAccountRequest)) + l = len(m.JwksUri) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_ImportAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImportAccountRequst) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).ImportAccount(ctx, in) +func (m *HealthCheckResponse) Size() (n int) { + var l int + _ = l + if m.Http { + n += 2 } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ImportAccount", + if m.Db { + n += 2 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ImportAccount(ctx, req.(*ImportAccountRequst)) + if m.Redis { + n += 2 } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_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.(AuthNServer).Login(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/Login", +func (m *Key) Size() (n int) { + var l int + _ = l + l = len(m.Use) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).Login(ctx, req.(*LoginRequest)) + if len(m.Alg) > 0 { + for _, s := range m.Alg { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_RefreshSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err + l = len(m.Kty) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - if interceptor == nil { - return srv.(AuthNServer).RefreshSession(ctx, in) + l = len(m.Kid) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/RefreshSession", + l = len(m.E) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).RefreshSession(ctx, req.(*types.Empty)) + l = len(m.N) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).Logout(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/Logout", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).Logout(ctx, req.(*types.Empty)) +func (m *JWKSResponse) Size() (n int) { + var l int + _ = l + if len(m.Keys) > 0 { + for _, e := range m.Keys { + l = e.Size() + n += 1 + l + sovAuthn(uint64(l)) + } } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_RequestPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PasswordResetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).RequestPasswordReset(ctx, in) +func sovAuthn(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/RequestPasswordReset", + return n +} +func sozAuthn(x uint64) (n int) { + return sovAuthn(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *SignupRequest) String() string { + if this == nil { + return "nil" } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).RequestPasswordReset(ctx, req.(*PasswordResetRequest)) + s := strings.Join([]string{`&SignupRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `}`, + }, "") + return s +} +func (this *SignupResponse) String() string { + if this == nil { + return "nil" } - return interceptor(ctx, in, info, handler) + s := strings.Join([]string{`&SignupResponse{`, + `IdToken:` + fmt.Sprintf("%v", this.IdToken) + `,`, + `}`, + }, "") + return s } - -func _AuthN_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangePasswordRequest) - if err := dec(in); err != nil { - return nil, err +func (this *SignupResponseEnvelope) String() string { + if this == nil { + return "nil" } - if interceptor == nil { - return srv.(AuthNServer).ChangePassword(ctx, in) + s := strings.Join([]string{`&SignupResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "SignupResponse", "SignupResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *IsUsernameAvailableRequest) String() string { + if this == nil { + return "nil" } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ChangePassword", + s := strings.Join([]string{`&IsUsernameAvailableRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *IsUsernameAvailableResponseEnvelope) String() string { + if this == nil { + return "nil" } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) + s := strings.Join([]string{`&IsUsernameAvailableResponseEnvelope{`, + `Result:` + fmt.Sprintf("%v", this.Result) + `,`, + `}`, + }, "") + return s +} +func (this *LoginRequest) String() string { + if this == nil { + return "nil" } - return interceptor(ctx, in, info, handler) + s := strings.Join([]string{`&LoginRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `}`, + }, "") + return s } - -func _AuthN_ExpirePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExpirePasswordRequest) - if err := dec(in); err != nil { - return nil, err +func (this *PasswordResetRequest) String() string { + if this == nil { + return "nil" } - if interceptor == nil { - return srv.(AuthNServer).ExpirePassword(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ExpirePassword", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ExpirePassword(ctx, req.(*ExpirePasswordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_BeginOAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BeginOAuthRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).BeginOAuth(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/BeginOAuth", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).BeginOAuth(ctx, req.(*BeginOAuthRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_OAuthReturn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OAuthReturnRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).OAuthReturn(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/OAuthReturn", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).OAuthReturn(ctx, req.(*OAuthReturnRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_ServiceConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).ServiceConfiguration(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ServiceConfiguration", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ServiceConfiguration(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_JWKS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).JWKS(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/JWKS", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).JWKS(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_ServiceStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).ServiceStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ServiceStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ServiceStats(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_ServerStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).ServerStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ServerStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ServerStats(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).HealthCheck(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/HealthCheck", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).HealthCheck(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _AuthN_serviceDesc = grpc.ServiceDesc{ - ServiceName: "grpc.AuthN", - HandlerType: (*AuthNServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Signup", - Handler: _AuthN_Signup_Handler, - }, - { - MethodName: "GetAccount", - Handler: _AuthN_GetAccount_Handler, - }, - { - MethodName: "UpdateAccount", - Handler: _AuthN_UpdateAccount_Handler, - }, - { - MethodName: "IsUsernameAvailable", - Handler: _AuthN_IsUsernameAvailable_Handler, - }, - { - MethodName: "LockAccount", - Handler: _AuthN_LockAccount_Handler, - }, - { - MethodName: "UnlockAcount", - Handler: _AuthN_UnlockAcount_Handler, - }, - { - MethodName: "ArchiveAccount", - Handler: _AuthN_ArchiveAccount_Handler, - }, - { - MethodName: "ImportAccount", - Handler: _AuthN_ImportAccount_Handler, - }, - { - MethodName: "Login", - Handler: _AuthN_Login_Handler, - }, - { - MethodName: "RefreshSession", - Handler: _AuthN_RefreshSession_Handler, - }, - { - MethodName: "Logout", - Handler: _AuthN_Logout_Handler, - }, - { - MethodName: "RequestPasswordReset", - Handler: _AuthN_RequestPasswordReset_Handler, - }, - { - MethodName: "ChangePassword", - Handler: _AuthN_ChangePassword_Handler, - }, - { - MethodName: "ExpirePassword", - Handler: _AuthN_ExpirePassword_Handler, - }, - { - MethodName: "BeginOAuth", - Handler: _AuthN_BeginOAuth_Handler, - }, - { - MethodName: "OAuthReturn", - Handler: _AuthN_OAuthReturn_Handler, - }, - { - MethodName: "ServiceConfiguration", - Handler: _AuthN_ServiceConfiguration_Handler, - }, - { - MethodName: "JWKS", - Handler: _AuthN_JWKS_Handler, - }, - { - MethodName: "ServiceStats", - Handler: _AuthN_ServiceStats_Handler, - }, - { - MethodName: "ServerStats", - Handler: _AuthN_ServerStats_Handler, - }, - { - MethodName: "HealthCheck", - Handler: _AuthN_HealthCheck_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authn.proto", -} - -func (m *SignupRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignupRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if len(m.Password) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - } - return i, nil + s := strings.Join([]string{`&PasswordResetRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s } - -func (m *SignupResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err +func (this *ChangePasswordRequest) String() string { + if this == nil { + return "nil" } - return dAtA[:n], nil + s := strings.Join([]string{`&ChangePasswordRequest{`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `Token:` + fmt.Sprintf("%v", this.Token) + `,`, + `CurrentPassword:` + fmt.Sprintf("%v", this.CurrentPassword) + `,`, + `}`, + }, "") + return s } - -func (m *SignupResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.IdToken) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.IdToken))) - i += copy(dAtA[i:], m.IdToken) +func (this *BeginOAuthRequest) String() string { + if this == nil { + return "nil" } - return i, nil + s := strings.Join([]string{`&BeginOAuthRequest{`, + `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, + `RedirectURI:` + fmt.Sprintf("%v", this.RedirectURI) + `,`, + `}`, + }, "") + return s } - -func (m *SignupResponseEnvelope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err +func (this *BeginOAuthResponse) String() string { + if this == nil { + return "nil" } - return dAtA[:n], nil + s := strings.Join([]string{`&BeginOAuthResponse{`, + `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, + `}`, + }, "") + return s } - -func (m *SignupResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Result != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) - n1, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - return i, nil -} - -func (m *GetAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *GetAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetAccountResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Id)) - } - if len(m.Username) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if m.Locked { - dAtA[i] = 0x18 - i++ - if m.Locked { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Deleted { - dAtA[i] = 0x20 - i++ - if m.Deleted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *GetAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Result != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) - n2, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} - -func (m *UpdateAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpdateAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if len(m.Username) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - return i, nil -} - -func (m *IsUsernameAvailableRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IsUsernameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - return i, nil -} - -func (m *IsUsernameAvailableResponseEnvelope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IsUsernameAvailableResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Result { - dAtA[i] = 0x8 - i++ - if m.Result { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *LockAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LockAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *UnlockAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UnlockAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *ArchiveAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ArchiveAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *ImportAccountRequst) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImportAccountRequst) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if len(m.Password) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - } - if m.Locked { - dAtA[i] = 0x18 - i++ - if m.Locked { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *ImportAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImportAccountResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Id)) - } - return i, nil -} - -func (m *ImportAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImportAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Result != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) - n3, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - return i, nil -} - -func (m *LoginRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LoginRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if len(m.Password) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - } - return i, nil -} - -func (m *PasswordResetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PasswordResetRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - return i, nil -} - -func (m *ChangePasswordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChangePasswordRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Password) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - } - if len(m.Token) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) - i += copy(dAtA[i:], m.Token) - } - if len(m.CurrentPassword) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.CurrentPassword))) - i += copy(dAtA[i:], m.CurrentPassword) - } - return i, nil -} - -func (m *ExpirePasswordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExpirePasswordRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *BeginOAuthRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeginOAuthRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ProviderName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) - i += copy(dAtA[i:], m.ProviderName) - } - if len(m.RedirectURI) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.RedirectURI))) - i += copy(dAtA[i:], m.RedirectURI) - } - return i, nil -} - -func (m *BeginOAuthResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeginOAuthResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Provider) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Provider))) - i += copy(dAtA[i:], m.Provider) - } - return i, nil -} - -func (m *OAuthReturnRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthReturnRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ProviderName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) - i += copy(dAtA[i:], m.ProviderName) - } - return i, nil -} - -func (m *OAuthReturnResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthReturnResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Redirect) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Redirect))) - i += copy(dAtA[i:], m.Redirect) - } - return i, nil -} - -func (m *Configuration) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Configuration) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Issuer) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Issuer))) - i += copy(dAtA[i:], m.Issuer) - } - if len(m.ResponseTypesSupported) > 0 { - for _, s := range m.ResponseTypesSupported { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.SubjectTypesSupported) > 0 { - for _, s := range m.SubjectTypesSupported { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.IdTokenSigningAlgValuesSupported) > 0 { - for _, s := range m.IdTokenSigningAlgValuesSupported { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.ClaimsSupported) > 0 { - for _, s := range m.ClaimsSupported { - dAtA[i] = 0x2a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.JwksUri) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.JwksUri))) - i += copy(dAtA[i:], m.JwksUri) - } - return i, nil -} - -func (m *ServiceStatsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceStatsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - return i, nil -} - -func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Http { - dAtA[i] = 0x8 - i++ - if m.Http { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Db { - dAtA[i] = 0x10 - i++ - if m.Db { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Redis { - dAtA[i] = 0x18 - i++ - if m.Redis { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *Key) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Key) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Use) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Use))) - i += copy(dAtA[i:], m.Use) - } - if len(m.Alg) > 0 { - for _, s := range m.Alg { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Kty) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kty))) - i += copy(dAtA[i:], m.Kty) - } - if len(m.Kid) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kid))) - i += copy(dAtA[i:], m.Kid) - } - if len(m.E) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.E))) - i += copy(dAtA[i:], m.E) - } - if len(m.N) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.N))) - i += copy(dAtA[i:], m.N) - } - return i, nil -} - -func (m *JWKSResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JWKSResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Keys) > 0 { - for _, msg := range m.Keys { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func encodeVarintAuthn(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *SignupRequest) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *SignupResponse) Size() (n int) { - var l int - _ = l - l = len(m.IdToken) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *SignupResponseEnvelope) Size() (n int) { - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *GetAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *GetAccountResponse) Size() (n int) { - var l int - _ = l - if m.Id != 0 { - n += 1 + sovAuthn(uint64(m.Id)) - } - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - if m.Locked { - n += 2 - } - if m.Deleted { - n += 2 - } - return n -} - -func (m *GetAccountResponseEnvelope) Size() (n int) { - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *UpdateAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *IsUsernameAvailableRequest) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *IsUsernameAvailableResponseEnvelope) Size() (n int) { - var l int - _ = l - if m.Result { - n += 2 - } - return n -} - -func (m *LockAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *UnlockAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ArchiveAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ImportAccountRequst) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - if m.Locked { - n += 2 - } - return n -} - -func (m *ImportAccountResponse) Size() (n int) { - var l int - _ = l - if m.Id != 0 { - n += 1 + sovAuthn(uint64(m.Id)) - } - return n -} - -func (m *ImportAccountResponseEnvelope) Size() (n int) { - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *LoginRequest) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *PasswordResetRequest) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ChangePasswordRequest) Size() (n int) { - var l int - _ = l - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Token) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.CurrentPassword) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ExpirePasswordRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *BeginOAuthRequest) Size() (n int) { - var l int - _ = l - l = len(m.ProviderName) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.RedirectURI) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *BeginOAuthResponse) Size() (n int) { - var l int - _ = l - l = len(m.Provider) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *OAuthReturnRequest) Size() (n int) { - var l int - _ = l - l = len(m.ProviderName) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *OAuthReturnResponse) Size() (n int) { - var l int - _ = l - l = len(m.Redirect) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *Configuration) Size() (n int) { - var l int - _ = l - l = len(m.Issuer) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - if len(m.ResponseTypesSupported) > 0 { - for _, s := range m.ResponseTypesSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - if len(m.SubjectTypesSupported) > 0 { - for _, s := range m.SubjectTypesSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - if len(m.IdTokenSigningAlgValuesSupported) > 0 { - for _, s := range m.IdTokenSigningAlgValuesSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - if len(m.ClaimsSupported) > 0 { - for _, s := range m.ClaimsSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - l = len(m.JwksUri) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ServiceStatsResponse) Size() (n int) { - var l int - _ = l - return n -} - -func (m *HealthCheckResponse) Size() (n int) { - var l int - _ = l - if m.Http { - n += 2 - } - if m.Db { - n += 2 - } - if m.Redis { - n += 2 - } - return n -} - -func (m *Key) Size() (n int) { - var l int - _ = l - l = len(m.Use) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - if len(m.Alg) > 0 { - for _, s := range m.Alg { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - l = len(m.Kty) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Kid) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.E) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.N) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *JWKSResponse) Size() (n int) { - var l int - _ = l - if len(m.Keys) > 0 { - for _, e := range m.Keys { - l = e.Size() - n += 1 + l + sovAuthn(uint64(l)) - } - } - return n -} - -func sovAuthn(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAuthn(x uint64) (n int) { - return sovAuthn(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *SignupRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignupRequest{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `}`, - }, "") - return s -} -func (this *SignupResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignupResponse{`, - `IdToken:` + fmt.Sprintf("%v", this.IdToken) + `,`, - `}`, - }, "") - return s -} -func (this *SignupResponseEnvelope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignupResponseEnvelope{`, - `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "SignupResponse", "SignupResponse", 1) + `,`, - `}`, - }, "") - return s -} -func (this *GetAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GetAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *GetAccountResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GetAccountResponse{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, - `Deleted:` + fmt.Sprintf("%v", this.Deleted) + `,`, - `}`, - }, "") - return s -} -func (this *GetAccountResponseEnvelope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GetAccountResponseEnvelope{`, - `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "GetAccountResponse", "GetAccountResponse", 1) + `,`, - `}`, - }, "") - return s -} -func (this *UpdateAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UpdateAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `}`, - }, "") - return s -} -func (this *IsUsernameAvailableRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IsUsernameAvailableRequest{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `}`, - }, "") - return s -} -func (this *IsUsernameAvailableResponseEnvelope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IsUsernameAvailableResponseEnvelope{`, - `Result:` + fmt.Sprintf("%v", this.Result) + `,`, - `}`, - }, "") - return s -} -func (this *LockAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LockAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *UnlockAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnlockAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *ArchiveAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ArchiveAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *ImportAccountRequst) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImportAccountRequst{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, - `}`, - }, "") - return s -} -func (this *ImportAccountResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImportAccountResponse{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *ImportAccountResponseEnvelope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImportAccountResponseEnvelope{`, - `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "ImportAccountResponse", "ImportAccountResponse", 1) + `,`, - `}`, - }, "") - return s -} -func (this *LoginRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LoginRequest{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `}`, - }, "") - return s -} -func (this *PasswordResetRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PasswordResetRequest{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `}`, - }, "") - return s -} -func (this *ChangePasswordRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ChangePasswordRequest{`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `Token:` + fmt.Sprintf("%v", this.Token) + `,`, - `CurrentPassword:` + fmt.Sprintf("%v", this.CurrentPassword) + `,`, - `}`, - }, "") - return s -} -func (this *ExpirePasswordRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExpirePasswordRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *BeginOAuthRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BeginOAuthRequest{`, - `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, - `RedirectURI:` + fmt.Sprintf("%v", this.RedirectURI) + `,`, - `}`, - }, "") - return s -} -func (this *BeginOAuthResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BeginOAuthResponse{`, - `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, - `}`, - }, "") - return s -} -func (this *OAuthReturnRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OAuthReturnRequest{`, - `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, - `}`, - }, "") - return s -} -func (this *OAuthReturnResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OAuthReturnResponse{`, - `Redirect:` + fmt.Sprintf("%v", this.Redirect) + `,`, - `}`, - }, "") - return s -} -func (this *Configuration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Configuration{`, - `Issuer:` + fmt.Sprintf("%v", this.Issuer) + `,`, - `ResponseTypesSupported:` + fmt.Sprintf("%v", this.ResponseTypesSupported) + `,`, - `SubjectTypesSupported:` + fmt.Sprintf("%v", this.SubjectTypesSupported) + `,`, - `IdTokenSigningAlgValuesSupported:` + fmt.Sprintf("%v", this.IdTokenSigningAlgValuesSupported) + `,`, - `ClaimsSupported:` + fmt.Sprintf("%v", this.ClaimsSupported) + `,`, - `JwksUri:` + fmt.Sprintf("%v", this.JwksUri) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceStatsResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceStatsResponse{`, - `}`, - }, "") - return s -} -func (this *HealthCheckResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HealthCheckResponse{`, - `Http:` + fmt.Sprintf("%v", this.Http) + `,`, - `Db:` + fmt.Sprintf("%v", this.Db) + `,`, - `Redis:` + fmt.Sprintf("%v", this.Redis) + `,`, - `}`, - }, "") - return s -} -func (this *Key) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Key{`, - `Use:` + fmt.Sprintf("%v", this.Use) + `,`, - `Alg:` + fmt.Sprintf("%v", this.Alg) + `,`, - `Kty:` + fmt.Sprintf("%v", this.Kty) + `,`, - `Kid:` + fmt.Sprintf("%v", this.Kid) + `,`, - `E:` + fmt.Sprintf("%v", this.E) + `,`, - `N:` + fmt.Sprintf("%v", this.N) + `,`, - `}`, - }, "") - return s -} -func (this *JWKSResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JWKSResponse{`, - `Keys:` + strings.Replace(fmt.Sprintf("%v", this.Keys), "Key", "Key", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringAuthn(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *SignupRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignupRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignupRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignupResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignupResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignupResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IdToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignupResponseEnvelope) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignupResponseEnvelope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignupResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &SignupResponse{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Locked = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Deleted = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetAccountResponseEnvelope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &GetAccountResponse{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdateAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } +func (this *OAuthReturnRequest) String() string { + if this == nil { + return "nil" } - - if iNdEx > l { - return io.ErrUnexpectedEOF + s := strings.Join([]string{`&OAuthReturnRequest{`, + `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, + `}`, + }, "") + return s +} +func (this *OAuthReturnResponse) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&OAuthReturnResponse{`, + `Redirect:` + fmt.Sprintf("%v", this.Redirect) + `,`, + `}`, + }, "") + return s } -func (m *IsUsernameAvailableRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IsUsernameAvailableRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IsUsernameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } +func (this *Configuration) String() string { + if this == nil { + return "nil" } - - if iNdEx > l { - return io.ErrUnexpectedEOF + s := strings.Join([]string{`&Configuration{`, + `Issuer:` + fmt.Sprintf("%v", this.Issuer) + `,`, + `ResponseTypesSupported:` + fmt.Sprintf("%v", this.ResponseTypesSupported) + `,`, + `SubjectTypesSupported:` + fmt.Sprintf("%v", this.SubjectTypesSupported) + `,`, + `IdTokenSigningAlgValuesSupported:` + fmt.Sprintf("%v", this.IdTokenSigningAlgValuesSupported) + `,`, + `ClaimsSupported:` + fmt.Sprintf("%v", this.ClaimsSupported) + `,`, + `JwksUri:` + fmt.Sprintf("%v", this.JwksUri) + `,`, + `}`, + }, "") + return s +} +func (this *HealthCheckResponse) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&HealthCheckResponse{`, + `Http:` + fmt.Sprintf("%v", this.Http) + `,`, + `Db:` + fmt.Sprintf("%v", this.Db) + `,`, + `Redis:` + fmt.Sprintf("%v", this.Redis) + `,`, + `}`, + }, "") + return s } -func (m *IsUsernameAvailableResponseEnvelope) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Result = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } +func (this *Key) String() string { + if this == nil { + return "nil" } - - if iNdEx > l { - return io.ErrUnexpectedEOF + s := strings.Join([]string{`&Key{`, + `Use:` + fmt.Sprintf("%v", this.Use) + `,`, + `Alg:` + fmt.Sprintf("%v", this.Alg) + `,`, + `Kty:` + fmt.Sprintf("%v", this.Kty) + `,`, + `Kid:` + fmt.Sprintf("%v", this.Kid) + `,`, + `E:` + fmt.Sprintf("%v", this.E) + `,`, + `N:` + fmt.Sprintf("%v", this.N) + `,`, + `}`, + }, "") + return s +} +func (this *JWKSResponse) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&JWKSResponse{`, + `Keys:` + strings.Replace(fmt.Sprintf("%v", this.Keys), "Key", "Key", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringAuthn(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) } -func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { +func (m *SignupRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5762,15 +3018,15 @@ func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LockAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SignupRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignupRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5788,68 +3044,18 @@ func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { } } intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn + if intStringLen < 0 { + return ErrInvalidLengthAuthn } - if iNdEx >= l { + postIndex := iNdEx + intStringLen + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnlockAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnlockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5874,7 +3080,7 @@ func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.Password = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5897,7 +3103,7 @@ func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { +func (m *SignupResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5920,15 +3126,15 @@ func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ArchiveAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SignupResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ArchiveAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignupResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5953,7 +3159,7 @@ func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.IdToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5976,7 +3182,7 @@ func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { +func (m *SignupResponseEnvelope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5999,17 +3205,17 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImportAccountRequst: wiretype end group for non-group") + return fmt.Errorf("proto: SignupResponseEnvelope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImportAccountRequst: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignupResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -6019,70 +3225,25 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuthn } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn + if m.Result == nil { + m.Result = &SignupResponse{} } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Password = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Locked = bool(v != 0) default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -6104,7 +3265,7 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { +func (m *IsUsernameAvailableRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6127,17 +3288,17 @@ func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImportAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: IsUsernameAvailableRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImportAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IsUsernameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) } - m.Id = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -6147,11 +3308,21 @@ func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= (int64(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -6173,7 +3344,7 @@ func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { +func (m *IsUsernameAvailableResponseEnvelope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6196,17 +3367,17 @@ func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImportAccountResponseEnvelope: wiretype end group for non-group") + return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImportAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -6216,25 +3387,12 @@ func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &ImportAccountResponse{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.Result = bool(v != 0) default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -6580,85 +3738,6 @@ func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ExpirePasswordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExpirePasswordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExpirePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *BeginOAuthRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7228,56 +4307,6 @@ func (m *Configuration) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceStatsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceStatsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7798,102 +4827,77 @@ var ( ErrIntOverflowAuthn = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_975e18bf4e534da8) } - -var fileDescriptor_authn_975e18bf4e534da8 = []byte{ - // 1495 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xdf, 0x6e, 0xd4, 0x46, - 0x17, 0x8f, 0x37, 0xc9, 0x66, 0x73, 0x36, 0xd9, 0x84, 0xd9, 0x4d, 0xb2, 0x18, 0x58, 0x56, 0x86, - 0x0f, 0x02, 0xfa, 0x88, 0xf9, 0x82, 0xf4, 0x89, 0x72, 0x97, 0x20, 0xa0, 0x01, 0x44, 0x60, 0x43, - 0x5a, 0xd1, 0x7f, 0x2b, 0xc7, 0x1e, 0xbc, 0x43, 0x1c, 0xdb, 0xf5, 0x8c, 0x43, 0x23, 0x84, 0x5a, - 0xf5, 0x09, 0x2a, 0xf5, 0x25, 0xb8, 0xec, 0x63, 0xf4, 0x12, 0xa9, 0x37, 0xbd, 0x42, 0x25, 0xed, - 0x45, 0xc5, 0x15, 0x8f, 0x50, 0xcd, 0x78, 0x6c, 0xaf, 0xbd, 0x76, 0x42, 0xdb, 0x3b, 0x9f, 0x99, - 0x73, 0x7e, 0x67, 0xce, 0x99, 0xdf, 0xce, 0xef, 0x24, 0x50, 0x37, 0x42, 0x36, 0x70, 0x57, 0xfc, - 0xc0, 0x63, 0x1e, 0x9a, 0xb0, 0x03, 0xdf, 0x54, 0x4f, 0xd9, 0x9e, 0x67, 0x3b, 0x58, 0x17, 0x6b, - 0x3b, 0xe1, 0x53, 0x1d, 0xef, 0xf9, 0xec, 0x20, 0x72, 0x51, 0xaf, 0xd8, 0x84, 0x0d, 0xc2, 0x9d, - 0x15, 0xd3, 0xdb, 0xd3, 0x6d, 0xcf, 0xf6, 0x52, 0x2f, 0x6e, 0x09, 0x43, 0x7c, 0x49, 0xf7, 0xd3, - 0x12, 0xcb, 0xf0, 0x89, 0x6e, 0xb8, 0xae, 0xc7, 0x0c, 0x46, 0x3c, 0x97, 0x46, 0xbb, 0xda, 0x1d, - 0x98, 0xdd, 0x22, 0xb6, 0x1b, 0xfa, 0x3d, 0xfc, 0x75, 0x88, 0x29, 0x43, 0x2a, 0xd4, 0x42, 0x8a, - 0x03, 0xd7, 0xd8, 0xc3, 0x6d, 0xa5, 0xab, 0x2c, 0x4f, 0xf7, 0x12, 0x9b, 0xef, 0xf9, 0x06, 0xa5, - 0xcf, 0xbd, 0xc0, 0x6a, 0x57, 0xa2, 0xbd, 0xd8, 0xd6, 0x3e, 0x82, 0x46, 0x0c, 0x44, 0x7d, 0xcf, - 0xa5, 0x18, 0x5d, 0x84, 0x1a, 0xb1, 0xfa, 0xcc, 0xdb, 0xc5, 0x6e, 0x84, 0xb4, 0x3e, 0xf3, 0xee, - 0xcd, 0xd9, 0x64, 0xad, 0x37, 0x45, 0xac, 0xc7, 0xfc, 0x43, 0xbb, 0x0d, 0x8b, 0xd9, 0xd0, 0x5b, - 0xee, 0x3e, 0x76, 0x3c, 0x1f, 0xa3, 0xff, 0x42, 0x35, 0xc0, 0x34, 0x74, 0x98, 0x00, 0xa8, 0xaf, - 0xb6, 0x56, 0x78, 0x7b, 0x56, 0xb2, 0xde, 0x3d, 0xe9, 0xa3, 0x9d, 0x83, 0x13, 0x77, 0x30, 0x5b, - 0x33, 0x4d, 0x2f, 0x74, 0x59, 0x5c, 0x4f, 0x03, 0x2a, 0xc4, 0x92, 0x95, 0x54, 0x88, 0xa5, 0x05, - 0x80, 0x86, 0x9d, 0xe4, 0x59, 0x53, 0xaf, 0x71, 0xee, 0x95, 0xe9, 0x42, 0x25, 0xd7, 0x85, 0x45, - 0xa8, 0x3a, 0x9e, 0xb9, 0x8b, 0xad, 0xf6, 0x78, 0x57, 0x59, 0xae, 0xf5, 0xa4, 0x85, 0xda, 0x30, - 0x65, 0x61, 0x07, 0x33, 0x6c, 0xb5, 0x27, 0xc4, 0x46, 0x6c, 0x6a, 0x0f, 0x40, 0x1d, 0xcd, 0x99, - 0x14, 0x79, 0x35, 0x57, 0x64, 0x3b, 0x2a, 0x72, 0x34, 0x22, 0x29, 0x74, 0x1d, 0x5a, 0xdb, 0xbe, - 0x65, 0x30, 0x7c, 0x74, 0xad, 0x47, 0x55, 0xa1, 0x5d, 0x07, 0x75, 0x83, 0x6e, 0x4b, 0x6b, 0x6d, - 0xdf, 0x20, 0x8e, 0xb1, 0xe3, 0xe0, 0x0f, 0x60, 0x81, 0xb6, 0x01, 0xe7, 0x0a, 0x23, 0x73, 0x65, - 0x69, 0x99, 0xb2, 0x6a, 0xeb, 0xf0, 0xee, 0xcd, 0x59, 0xb9, 0x92, 0x14, 0x72, 0x1e, 0xd0, 0x7d, - 0xcf, 0xdc, 0x3d, 0xe6, 0xca, 0x2e, 0x40, 0x6b, 0xdb, 0x75, 0x8e, 0xf7, 0xbb, 0x08, 0x0b, 0x6b, - 0x81, 0x39, 0x20, 0xfb, 0xc7, 0xf4, 0x45, 0xc3, 0xd0, 0xdc, 0xd8, 0xf3, 0xbd, 0x60, 0x98, 0x2b, - 0xff, 0x9c, 0xfa, 0x65, 0x84, 0xd0, 0x74, 0x58, 0xc8, 0xa5, 0x91, 0x6c, 0x5b, 0x4c, 0xd9, 0xb6, - 0x5e, 0x7d, 0xf7, 0xe6, 0x6c, 0x85, 0x58, 0xe2, 0x5c, 0x8f, 0xe1, 0x4c, 0x61, 0x40, 0xd2, 0xd3, - 0x6b, 0x39, 0xaa, 0x9c, 0x8a, 0xa8, 0x52, 0x18, 0x94, 0x34, 0xf9, 0x36, 0xcc, 0xdc, 0xf7, 0x6c, - 0xe2, 0xfe, 0xdb, 0x5f, 0xf8, 0x2a, 0xb4, 0x1e, 0xca, 0xef, 0x1e, 0xa6, 0x98, 0x7d, 0x08, 0x57, - 0x28, 0x2c, 0xdc, 0x1c, 0x18, 0xae, 0x8d, 0xd3, 0xc8, 0x24, 0x28, 0x49, 0xa4, 0xe4, 0xfa, 0xd9, - 0x82, 0xc9, 0xe8, 0xd5, 0x88, 0x4e, 0x10, 0x19, 0x68, 0x19, 0xe6, 0xcc, 0x30, 0x08, 0xb0, 0xcb, - 0x62, 0x2c, 0xd1, 0xee, 0xe9, 0x5e, 0x7e, 0x99, 0xf3, 0xe0, 0xd6, 0x37, 0x3e, 0x09, 0x46, 0x92, - 0xe6, 0x79, 0xf0, 0x04, 0x4e, 0xac, 0x63, 0x9b, 0xb8, 0x9b, 0x6b, 0x21, 0x1b, 0xc4, 0x4e, 0x1a, - 0xcc, 0xf8, 0x81, 0xb7, 0x4f, 0x2c, 0x1c, 0x3c, 0x48, 0x4b, 0xca, 0xac, 0xa1, 0x2e, 0xd4, 0x03, - 0x6c, 0x91, 0x00, 0x9b, 0x6c, 0xbb, 0xb7, 0x21, 0xcf, 0x39, 0xbc, 0xa4, 0x5d, 0x05, 0x34, 0x0c, - 0x2d, 0x2f, 0x9e, 0x57, 0x2d, 0x71, 0x92, 0xaa, 0xa5, 0xad, 0x5d, 0x07, 0x24, 0x9d, 0x59, 0x18, - 0xb8, 0x7f, 0xe3, 0x34, 0xda, 0xff, 0xa0, 0x99, 0x89, 0x4c, 0x93, 0xc5, 0x27, 0x8a, 0x93, 0xc5, - 0xb6, 0xf6, 0x53, 0x05, 0x66, 0x6f, 0x7a, 0xee, 0x53, 0x62, 0x87, 0x81, 0xd0, 0x03, 0x4e, 0x62, - 0x42, 0x69, 0x98, 0x1c, 0x4c, 0x5a, 0xe8, 0x3a, 0xb4, 0x03, 0x89, 0xd8, 0x67, 0x07, 0x3e, 0xa6, - 0x7d, 0x1a, 0xfa, 0x9c, 0x6e, 0x98, 0x33, 0x64, 0x7c, 0x79, 0xba, 0xb7, 0x18, 0xef, 0x3f, 0xe6, - 0xdb, 0x5b, 0xf1, 0x2e, 0xfa, 0x3f, 0x2c, 0xd1, 0x70, 0xe7, 0x19, 0x36, 0xd9, 0x48, 0xe0, 0xb8, - 0x08, 0x5c, 0x90, 0xdb, 0xb9, 0xb8, 0x4d, 0xf8, 0x4f, 0xac, 0x11, 0x7d, 0x4a, 0x6c, 0x97, 0xb8, - 0x76, 0xdf, 0x70, 0xec, 0xfe, 0xbe, 0xe1, 0x84, 0x19, 0x94, 0x09, 0x81, 0xd2, 0x95, 0x32, 0xb2, - 0x15, 0xb9, 0xae, 0x39, 0xf6, 0x27, 0xc2, 0x31, 0x05, 0xbc, 0x04, 0xf3, 0xa6, 0x63, 0x90, 0xbd, - 0xe1, 0xd8, 0x49, 0x11, 0x3b, 0x17, 0xad, 0xa7, 0xae, 0x27, 0xa1, 0xf6, 0xec, 0xf9, 0x2e, 0xed, - 0x87, 0x01, 0x69, 0x57, 0x45, 0x1f, 0xa6, 0xb8, 0xbd, 0x1d, 0x10, 0x6d, 0x11, 0x5a, 0x5b, 0x38, - 0xd8, 0x27, 0x26, 0xde, 0x62, 0x06, 0xa3, 0x71, 0x9b, 0xb5, 0x4d, 0x68, 0x7e, 0x8c, 0x0d, 0x87, - 0x0d, 0x6e, 0x0e, 0xb0, 0xb9, 0x9b, 0x74, 0x1f, 0xc1, 0xc4, 0x80, 0x31, 0x3f, 0x7a, 0xfc, 0x7a, - 0xe2, 0x9b, 0xf3, 0xcf, 0xda, 0x11, 0x6c, 0xa9, 0xf5, 0x2a, 0xd6, 0x0e, 0x27, 0x3a, 0xbf, 0x11, - 0x2a, 0xdf, 0x8d, 0xc8, 0xd0, 0x08, 0x8c, 0xdf, 0xc3, 0x07, 0x68, 0x1e, 0xc6, 0x43, 0x1a, 0x5f, - 0x38, 0xff, 0xe4, 0x2b, 0x86, 0x63, 0xcb, 0xae, 0xf3, 0x4f, 0xbe, 0xb2, 0xcb, 0x0e, 0xe4, 0xef, - 0x80, 0x7f, 0x8a, 0x15, 0x12, 0x09, 0x10, 0x5f, 0x21, 0x16, 0x9a, 0x01, 0x05, 0xb7, 0x27, 0x85, - 0xad, 0x60, 0x6e, 0xb9, 0xb2, 0x32, 0xc5, 0xd5, 0xae, 0xc0, 0xcc, 0xdd, 0x4f, 0xef, 0x6d, 0x25, - 0x87, 0x3e, 0x03, 0x13, 0xbb, 0xf8, 0x80, 0xb6, 0x95, 0xee, 0xf8, 0x72, 0x7d, 0x75, 0x3a, 0x7a, - 0x5d, 0xee, 0xe1, 0x83, 0x9e, 0x58, 0x5e, 0x7d, 0x35, 0x07, 0x93, 0x9c, 0x68, 0x0f, 0xd0, 0x23, - 0xa8, 0x46, 0x22, 0x8c, 0x9a, 0x59, 0x49, 0x16, 0xac, 0x55, 0x4f, 0x17, 0xe9, 0x74, 0xfc, 0x8a, - 0x69, 0xad, 0xef, 0x7f, 0xf9, 0xe3, 0xc7, 0x4a, 0x43, 0x9b, 0xd6, 0x8d, 0xe8, 0xc9, 0xa2, 0x37, - 0x94, 0xcb, 0xa8, 0x0f, 0x90, 0x4a, 0x1e, 0x5a, 0x1a, 0x15, 0xc1, 0x08, 0xba, 0x5b, 0xa6, 0x8e, - 0x09, 0xfc, 0xa2, 0x80, 0x9f, 0x47, 0x8d, 0x04, 0x5e, 0x7f, 0x41, 0xac, 0x97, 0x08, 0xc3, 0x6c, - 0x46, 0x35, 0x91, 0x1a, 0x41, 0x15, 0x49, 0xa9, 0xba, 0xb8, 0x12, 0x8d, 0x4d, 0x2b, 0xf1, 0x70, - 0xb5, 0x72, 0x8b, 0x8f, 0x60, 0x5a, 0x57, 0x80, 0xab, 0x6a, 0x0e, 0xfc, 0x46, 0xfa, 0x84, 0x7e, - 0x0b, 0xcd, 0x02, 0x79, 0x44, 0xf2, 0xdc, 0xe5, 0x9a, 0xab, 0x5e, 0x3a, 0xc2, 0x23, 0x57, 0xe2, - 0x29, 0x71, 0x8a, 0x05, 0xd4, 0x4c, 0x4f, 0x61, 0x24, 0x99, 0xbe, 0x80, 0xfa, 0x90, 0xa8, 0x22, - 0x39, 0x4e, 0x8c, 0xea, 0x6c, 0x69, 0x8d, 0x12, 0x5d, 0x6d, 0x66, 0x6b, 0xd4, 0xb9, 0xac, 0x21, - 0x03, 0x66, 0x62, 0x31, 0xce, 0x34, 0xb1, 0x40, 0xa0, 0x4b, 0x13, 0x9c, 0x11, 0x09, 0x96, 0xd4, - 0x85, 0x5c, 0x82, 0x50, 0x80, 0xa0, 0x2f, 0xa1, 0x91, 0xd5, 0x71, 0x24, 0x75, 0xae, 0x50, 0xdd, - 0x4b, 0xb3, 0x48, 0x1e, 0x5c, 0xce, 0xf3, 0xc0, 0x81, 0xd9, 0x8c, 0x60, 0xa2, 0x93, 0x85, 0x2a, - 0xca, 0x47, 0x02, 0xf5, 0xdc, 0x11, 0x02, 0x9b, 0xbf, 0x0d, 0x6d, 0x3e, 0x4d, 0x44, 0x44, 0x00, - 0xa7, 0xf5, 0x6d, 0x98, 0x14, 0xea, 0x8b, 0x50, 0x7c, 0x0f, 0xa9, 0x14, 0xab, 0x85, 0xf3, 0xac, - 0xd6, 0x14, 0x78, 0xb3, 0x5a, 0x4d, 0xa7, 0x98, 0x52, 0xe2, 0xb9, 0x1c, 0xe7, 0x21, 0x34, 0x7a, - 0xf8, 0x69, 0x80, 0xe9, 0x60, 0x2b, 0x5a, 0x44, 0x25, 0x75, 0x97, 0x80, 0xce, 0x0b, 0x50, 0x40, - 0x09, 0x28, 0xba, 0x0b, 0xd5, 0xfb, 0x9e, 0xed, 0x85, 0xac, 0x14, 0xa9, 0xac, 0xb3, 0x12, 0xeb, - 0x72, 0x8a, 0x65, 0x42, 0x4b, 0xd6, 0x94, 0x19, 0x11, 0x62, 0x76, 0x14, 0xcd, 0x0d, 0xa5, 0xe8, - 0x4b, 0x02, 0xfd, 0x04, 0x9a, 0xd3, 0xe3, 0x89, 0x40, 0x0f, 0x04, 0xd8, 0x13, 0x68, 0x64, 0x87, - 0x89, 0x98, 0x17, 0x85, 0x23, 0x46, 0x49, 0x1f, 0xd2, 0xc7, 0x27, 0x46, 0xe7, 0xdd, 0xdd, 0x83, - 0x46, 0x76, 0x64, 0x88, 0xa1, 0x0b, 0x07, 0x89, 0xd2, 0xa3, 0x5f, 0x10, 0xe0, 0x5d, 0xb5, 0x93, - 0x23, 0x36, 0x16, 0x28, 0xfd, 0x64, 0xc2, 0xf9, 0x0a, 0x20, 0x9d, 0x0e, 0xe2, 0xb7, 0x6e, 0x64, - 0x14, 0x51, 0xdb, 0xa3, 0x1b, 0xb2, 0x0a, 0xf9, 0x0b, 0x42, 0x0b, 0xba, 0xc7, 0xff, 0x7a, 0xd4, - 0x5f, 0x0c, 0x0f, 0x04, 0x2f, 0xd1, 0x00, 0xea, 0x43, 0x13, 0x41, 0xfc, 0x04, 0x8c, 0x8e, 0x17, - 0xea, 0xc9, 0x82, 0x1d, 0x99, 0xe2, 0xbc, 0x48, 0xd1, 0x41, 0xa7, 0x0b, 0x53, 0xe8, 0x41, 0x04, - 0xfd, 0x79, 0xa2, 0x8a, 0xb9, 0x71, 0xa2, 0x84, 0x52, 0x52, 0x2e, 0x32, 0xce, 0x43, 0x2f, 0xb6, - 0x99, 0x01, 0x59, 0x83, 0x09, 0x2e, 0x4f, 0xa5, 0x60, 0xf2, 0x27, 0x35, 0x2c, 0x61, 0xda, 0xac, - 0xc0, 0x9a, 0x42, 0x93, 0x3a, 0x17, 0x6e, 0xd4, 0x83, 0x99, 0x61, 0xd5, 0x2e, 0x85, 0x92, 0x44, - 0x2d, 0x54, 0xf8, 0x86, 0x80, 0xac, 0xa1, 0xaa, 0x4e, 0x05, 0xc6, 0x26, 0xd4, 0xb9, 0x1f, 0x0e, - 0x8e, 0x86, 0x3c, 0xe6, 0xd7, 0x83, 0x6a, 0xfa, 0x1e, 0x66, 0x01, 0x31, 0x29, 0x7a, 0x04, 0xf5, - 0xa1, 0x11, 0xa2, 0x14, 0x50, 0x5e, 0x56, 0xc1, 0xb4, 0xa1, 0xcd, 0x09, 0xcc, 0x69, 0x34, 0xa5, - 0x0f, 0xc4, 0xee, 0xfa, 0xea, 0xeb, 0xb7, 0x9d, 0xb1, 0x5f, 0xdf, 0x76, 0xc6, 0xde, 0xbf, 0xed, - 0x28, 0xdf, 0x1d, 0x76, 0x94, 0x57, 0x87, 0x1d, 0xe5, 0xe7, 0xc3, 0x8e, 0xf2, 0xfa, 0xb0, 0xa3, - 0xfc, 0x76, 0xd8, 0x51, 0xfe, 0x3c, 0xec, 0x8c, 0xbd, 0x3f, 0xec, 0x28, 0x3f, 0xfc, 0xde, 0x19, - 0xfb, 0x4c, 0xfc, 0xd7, 0x61, 0xa7, 0x2a, 0xf2, 0x5d, 0xfb, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x9d, - 0xdf, 0xd9, 0xeb, 0x91, 0x10, 0x00, 0x00, +func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_44d0ba90dadea045) } + +var fileDescriptor_authn_44d0ba90dadea045 = []byte{ + // 1103 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0xc6, 0x89, 0xe3, 0xbc, 0x4e, 0x9c, 0x74, 0xec, 0x24, 0xae, 0xdb, 0x6e, 0xa3, 0x05, + 0x44, 0x5a, 0x51, 0x2f, 0x04, 0x09, 0x15, 0x6e, 0x49, 0xd4, 0x40, 0x9a, 0xaa, 0x49, 0xd7, 0x0d, + 0xa8, 0x20, 0x61, 0xad, 0xd7, 0x93, 0xf5, 0x34, 0x9b, 0x9d, 0x65, 0x67, 0x36, 0x95, 0x85, 0x10, + 0x88, 0x5f, 0x80, 0xc4, 0x9f, 0xe0, 0xc8, 0x8f, 0xe0, 0xc0, 0xb1, 0x12, 0x17, 0x4e, 0x15, 0x31, + 0x1c, 0x50, 0x4f, 0xfd, 0x09, 0x68, 0x3e, 0x76, 0xed, 0x4d, 0x6c, 0x54, 0xc4, 0x6d, 0xde, 0xaf, + 0xe7, 0xfd, 0x98, 0x77, 0x9e, 0x5d, 0x28, 0xbb, 0x09, 0xef, 0x85, 0xcd, 0x28, 0xa6, 0x9c, 0xa2, + 0x19, 0x3f, 0x8e, 0xbc, 0xc6, 0x35, 0x9f, 0x52, 0x3f, 0xc0, 0xb6, 0xd4, 0x75, 0x92, 0x63, 0x1b, + 0x9f, 0x46, 0xbc, 0xaf, 0x5c, 0x1a, 0x77, 0x7c, 0xc2, 0x7b, 0x49, 0xa7, 0xe9, 0xd1, 0x53, 0xdb, + 0xa7, 0x3e, 0x1d, 0x7a, 0x09, 0x49, 0x0a, 0xf2, 0xa4, 0xdd, 0xaf, 0x6b, 0x2c, 0x37, 0x22, 0xb6, + 0x1b, 0x86, 0x94, 0xbb, 0x9c, 0xd0, 0x90, 0x29, 0xab, 0xf5, 0x31, 0x2c, 0xb6, 0x88, 0x1f, 0x26, + 0x91, 0x83, 0xbf, 0x4a, 0x30, 0xe3, 0xa8, 0x01, 0xa5, 0x84, 0xe1, 0x38, 0x74, 0x4f, 0x71, 0xdd, + 0x58, 0x37, 0x36, 0xe6, 0x9d, 0x4c, 0x16, 0xb6, 0xc8, 0x65, 0xec, 0x19, 0x8d, 0xbb, 0xf5, 0x69, + 0x65, 0x4b, 0x65, 0xeb, 0x43, 0xa8, 0xa4, 0x40, 0x2c, 0xa2, 0x21, 0xc3, 0xe8, 0x6d, 0x28, 0x91, + 0x6e, 0x9b, 0xd3, 0x13, 0x1c, 0x2a, 0xa4, 0xed, 0x85, 0x97, 0x2f, 0x6e, 0x66, 0x3a, 0x67, 0x8e, + 0x74, 0x1f, 0x8b, 0x83, 0xb5, 0x0b, 0xab, 0xf9, 0xd0, 0x7b, 0xe1, 0x19, 0x0e, 0x68, 0x84, 0xd1, + 0x3b, 0x50, 0x8c, 0x31, 0x4b, 0x02, 0x2e, 0x01, 0xca, 0x9b, 0xb5, 0xa6, 0x18, 0x4f, 0x33, 0xef, + 0xed, 0x68, 0x1f, 0xeb, 0x2e, 0x34, 0xf6, 0xd8, 0x91, 0x2e, 0x76, 0xeb, 0xcc, 0x25, 0x81, 0xdb, + 0x09, 0xf0, 0x6b, 0x34, 0x66, 0xed, 0xc1, 0x1b, 0x63, 0x23, 0x2f, 0x94, 0x63, 0xe5, 0xca, 0x29, + 0x6d, 0xc3, 0xcb, 0x17, 0x37, 0xb5, 0x26, 0x2b, 0x62, 0x17, 0x16, 0x1e, 0x50, 0x9f, 0x84, 0xff, + 0x77, 0x9e, 0x9b, 0x50, 0x3b, 0xd4, 0x67, 0x07, 0x33, 0xcc, 0x5f, 0xa7, 0x0d, 0x06, 0x2b, 0x3b, + 0x3d, 0x37, 0xf4, 0xf1, 0x30, 0x32, 0x0b, 0xca, 0x12, 0x19, 0xf9, 0x44, 0xa8, 0x06, 0xb3, 0xea, + 0x8e, 0x54, 0x05, 0x4a, 0x40, 0x1b, 0xb0, 0xe4, 0x25, 0x71, 0x8c, 0x43, 0x9e, 0x62, 0xd5, 0x0b, + 0xd2, 0x7e, 0x51, 0x6d, 0x3d, 0x81, 0x2b, 0xdb, 0xd8, 0x27, 0xe1, 0xc1, 0x56, 0xc2, 0x7b, 0x69, + 0x42, 0x0b, 0x16, 0xa2, 0x98, 0x9e, 0x91, 0x2e, 0x8e, 0x1f, 0x0e, 0x2b, 0xcd, 0xe9, 0xd0, 0x3a, + 0x94, 0x63, 0xdc, 0x25, 0x31, 0xf6, 0xf8, 0x91, 0xb3, 0xa7, 0xd3, 0x8f, 0xaa, 0xac, 0x77, 0x01, + 0x8d, 0x42, 0xeb, 0xbd, 0x12, 0xcd, 0x68, 0x9c, 0xac, 0x19, 0x2d, 0x5b, 0x77, 0x01, 0x69, 0x67, + 0x9e, 0xc4, 0xe1, 0x7f, 0xa8, 0xc6, 0x7a, 0x0f, 0xaa, 0xb9, 0xc8, 0x61, 0xb2, 0xb4, 0xa2, 0x34, + 0x59, 0x2a, 0x5b, 0x3f, 0x4f, 0xc3, 0xe2, 0x0e, 0x0d, 0x8f, 0x89, 0x9f, 0xc4, 0xf2, 0x51, 0xa1, + 0x55, 0x28, 0x12, 0xc6, 0x92, 0xac, 0x30, 0x2d, 0xa1, 0xbb, 0x50, 0x8f, 0x35, 0x62, 0x9b, 0xf7, + 0x23, 0xcc, 0xda, 0x2c, 0x89, 0x22, 0x1a, 0x73, 0x2c, 0x2e, 0xbe, 0xb0, 0x31, 0xef, 0xac, 0xa6, + 0xf6, 0xc7, 0xc2, 0xdc, 0x4a, 0xad, 0xe8, 0x03, 0x58, 0x63, 0x49, 0xe7, 0x29, 0xf6, 0xf8, 0xa5, + 0xc0, 0x82, 0x0c, 0x5c, 0xd1, 0xe6, 0x0b, 0x71, 0x07, 0xf0, 0x56, 0xfa, 0xd0, 0xda, 0x8c, 0xf8, + 0x21, 0x09, 0xfd, 0xb6, 0x1b, 0xf8, 0xed, 0x33, 0x37, 0x48, 0x72, 0x28, 0x33, 0x12, 0x65, 0x5d, + 0xbf, 0xc5, 0x96, 0x72, 0xdd, 0x0a, 0xfc, 0x4f, 0xa5, 0xe3, 0x10, 0xf0, 0x16, 0x2c, 0x7b, 0x81, + 0x4b, 0x4e, 0x47, 0x63, 0x67, 0x65, 0xec, 0x92, 0xd2, 0x0f, 0x5d, 0xaf, 0x42, 0xe9, 0xe9, 0xb3, + 0x13, 0xd6, 0x4e, 0x62, 0x52, 0x2f, 0xca, 0x39, 0xcc, 0x09, 0xf9, 0x28, 0x26, 0xd6, 0x01, 0x54, + 0x3f, 0xc1, 0x6e, 0xc0, 0x7b, 0x3b, 0x3d, 0xec, 0x9d, 0x64, 0x53, 0x46, 0x30, 0xd3, 0xe3, 0x3c, + 0x52, 0xcf, 0xca, 0x91, 0x67, 0x54, 0x81, 0xe9, 0x6e, 0x47, 0x6e, 0x45, 0xc9, 0x99, 0xee, 0x76, + 0xc4, 0x9e, 0x8a, 0xc9, 0x33, 0xb9, 0x87, 0x25, 0x47, 0x09, 0x16, 0x81, 0xc2, 0x3e, 0xee, 0xa3, + 0x65, 0x28, 0x24, 0x2c, 0xbd, 0x58, 0x71, 0x14, 0x1a, 0x37, 0xf0, 0xf5, 0x74, 0xc5, 0x51, 0x68, + 0x4e, 0x78, 0x5f, 0xaf, 0xb1, 0x38, 0x4a, 0x0d, 0x11, 0x23, 0x50, 0x1a, 0xd2, 0x45, 0x0b, 0x60, + 0xe0, 0xfa, 0xac, 0x94, 0x0d, 0x2c, 0xa4, 0x50, 0x77, 0x60, 0x84, 0xd6, 0x1d, 0x58, 0xb8, 0xff, + 0xd9, 0x7e, 0x2b, 0x2b, 0xfa, 0x06, 0xcc, 0x9c, 0xe0, 0x3e, 0xab, 0x1b, 0xeb, 0x85, 0x8d, 0xf2, + 0xe6, 0xbc, 0xa2, 0xa6, 0x7d, 0xdc, 0x77, 0xa4, 0x7a, 0xf3, 0x97, 0x12, 0x94, 0x0f, 0x93, 0x4e, + 0x40, 0x3c, 0xb1, 0x56, 0x0f, 0xd1, 0x23, 0x28, 0x2a, 0xde, 0x42, 0xd5, 0x3c, 0x8b, 0xc9, 0x1d, + 0x6d, 0x5c, 0x1f, 0x47, 0x6d, 0x29, 0xf3, 0x58, 0xb5, 0xef, 0x7f, 0xfb, 0xeb, 0xc7, 0xe9, 0x8a, + 0x35, 0x6f, 0xbb, 0x9e, 0x47, 0x93, 0x90, 0xb3, 0x8f, 0x8c, 0xdb, 0xe8, 0x5b, 0xa8, 0x8e, 0xa1, + 0x2d, 0xb4, 0xae, 0xa0, 0x26, 0x73, 0x61, 0xe3, 0xd6, 0xbf, 0x78, 0x5c, 0xc8, 0x7c, 0x4d, 0x66, + 0x5e, 0x41, 0xd5, 0x2c, 0xb3, 0xed, 0x66, 0x99, 0x76, 0x61, 0x56, 0x92, 0x1d, 0x42, 0x0a, 0x70, + 0x94, 0xf9, 0x1a, 0x63, 0xc9, 0xda, 0xaa, 0x4a, 0xbc, 0x45, 0xab, 0x64, 0x33, 0xcc, 0x18, 0xa1, + 0xa1, 0x68, 0xe4, 0x10, 0x2a, 0x0e, 0x3e, 0x8e, 0x31, 0xeb, 0xb5, 0x94, 0x12, 0xad, 0x36, 0xd5, + 0x67, 0xab, 0x99, 0x7e, 0xdc, 0x9a, 0xf7, 0xc4, 0x27, 0x70, 0x02, 0xe8, 0xb2, 0x04, 0x05, 0x94, + 0x81, 0xa2, 0xfb, 0x50, 0x7c, 0x40, 0x7d, 0x9a, 0xf0, 0x89, 0x48, 0x13, 0xf4, 0x29, 0xd6, 0xed, + 0x21, 0x96, 0x07, 0x35, 0xdd, 0x53, 0x8e, 0x91, 0x51, 0x43, 0xd5, 0x32, 0x8e, 0xa6, 0x27, 0xa2, + 0xaf, 0x49, 0xf4, 0x2b, 0x68, 0xc9, 0x4e, 0x09, 0xd8, 0x8e, 0x25, 0xd8, 0x13, 0xa8, 0xe4, 0xb9, + 0x1b, 0x5d, 0x53, 0xf0, 0x63, 0x19, 0x7d, 0xc2, 0x1c, 0x86, 0x6b, 0x92, 0xa2, 0x8b, 0xe9, 0x7e, + 0x09, 0x30, 0xa4, 0x51, 0xb4, 0xa6, 0x22, 0x2f, 0x71, 0x76, 0xa3, 0x7e, 0xd9, 0xa0, 0x61, 0x6f, + 0x48, 0xd8, 0x35, 0xb4, 0x62, 0x53, 0xf1, 0xaf, 0x62, 0x7f, 0x3d, 0xca, 0x9c, 0xdf, 0xa0, 0x1e, + 0x94, 0x47, 0xa8, 0x13, 0x69, 0x9c, 0xcb, 0x3c, 0xdc, 0xb8, 0x3a, 0xc6, 0xa2, 0x53, 0xbc, 0x29, + 0x53, 0x98, 0xe8, 0xfa, 0xd8, 0x14, 0x76, 0xac, 0xa0, 0xbf, 0x80, 0x5a, 0x0b, 0xc7, 0x67, 0xc4, + 0xc3, 0x17, 0x78, 0x77, 0xc2, 0x1d, 0xeb, 0x97, 0x96, 0x73, 0xb6, 0x56, 0x65, 0xaa, 0x65, 0x54, + 0xb1, 0xbd, 0x1c, 0xc8, 0x16, 0xcc, 0x88, 0xf7, 0x3d, 0x11, 0x4c, 0xef, 0xf8, 0x28, 0x07, 0x58, + 0x8b, 0x12, 0x6b, 0x0e, 0xcd, 0xda, 0x82, 0xe1, 0xd0, 0x23, 0x28, 0x8f, 0xd0, 0xdb, 0x44, 0x24, + 0x3d, 0x87, 0x31, 0x4c, 0x68, 0x2d, 0x49, 0xc0, 0x79, 0x34, 0x67, 0xf7, 0xa4, 0x75, 0x7b, 0xf3, + 0xf9, 0xb9, 0x39, 0xf5, 0xfb, 0xb9, 0x39, 0xf5, 0xea, 0xdc, 0x34, 0xbe, 0x1b, 0x98, 0xc6, 0x4f, + 0x03, 0xd3, 0xf8, 0x75, 0x60, 0x1a, 0xcf, 0x07, 0xa6, 0xf1, 0xc7, 0xc0, 0x34, 0xfe, 0x1e, 0x98, + 0x53, 0xaf, 0x06, 0xa6, 0xf1, 0xc3, 0x9f, 0xe6, 0xd4, 0xe7, 0xf2, 0xf7, 0xb1, 0x53, 0x94, 0xf9, + 0xde, 0xff, 0x27, 0x00, 0x00, 0xff, 0xff, 0x41, 0x76, 0xd1, 0x84, 0x5a, 0x0a, 0x00, 0x00, } diff --git a/grpc/authn.pb.gw.go b/grpc/authn.pb.gw.go index 9e10cac95b..b2f6f61735 100644 --- a/grpc/authn.pb.gw.go +++ b/grpc/authn.pb.gw.go @@ -29,7 +29,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -func request_AuthN_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SignupRequest var metadata runtime.ServerMetadata @@ -42,73 +42,15 @@ func request_AuthN_Signup_0(ctx context.Context, marshaler runtime.Marshaler, cl } -func request_AuthN_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateAccountRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Username); 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["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UpdateAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - var ( - filter_AuthN_IsUsernameAvailable_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_PublicAuthN_IsUsernameAvailable_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_AuthN_IsUsernameAvailable_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_IsUsernameAvailable_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq IsUsernameAvailableRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthN_IsUsernameAvailable_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_IsUsernameAvailable_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -117,101 +59,7 @@ func request_AuthN_IsUsernameAvailable_0(ctx context.Context, marshaler runtime. } -func request_AuthN_LockAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LockAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.LockAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_UnlockAcount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnlockAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UnlockAcount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_ArchiveAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.ArchiveAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_ImportAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportAccountRequst - 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.ImportAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_Login_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_Login_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LoginRequest var metadata runtime.ServerMetadata @@ -224,7 +72,7 @@ func request_AuthN_Login_0(ctx context.Context, marshaler runtime.Marshaler, cli } -func request_AuthN_RefreshSession_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_RefreshSession_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -233,7 +81,7 @@ func request_AuthN_RefreshSession_0(ctx context.Context, marshaler runtime.Marsh } -func request_AuthN_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -243,14 +91,14 @@ func request_AuthN_Logout_0(ctx context.Context, marshaler runtime.Marshaler, cl } var ( - filter_AuthN_RequestPasswordReset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_PublicAuthN_RequestPasswordReset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_AuthN_RequestPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_RequestPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq PasswordResetRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthN_RequestPasswordReset_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_RequestPasswordReset_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -259,7 +107,7 @@ func request_AuthN_RequestPasswordReset_0(ctx context.Context, marshaler runtime } -func request_AuthN_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ChangePasswordRequest var metadata runtime.ServerMetadata @@ -272,38 +120,11 @@ func request_AuthN_ChangePassword_0(ctx context.Context, marshaler runtime.Marsh } -func request_AuthN_ExpirePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ExpirePasswordRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.ExpirePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - var ( - filter_AuthN_BeginOAuth_0 = &utilities.DoubleArray{Encoding: map[string]int{"providerName": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_PublicAuthN_BeginOAuth_0 = &utilities.DoubleArray{Encoding: map[string]int{"providerName": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_AuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq BeginOAuthRequest var metadata runtime.ServerMetadata @@ -325,7 +146,7 @@ func request_AuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "providerName", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthN_BeginOAuth_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_BeginOAuth_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -334,7 +155,7 @@ func request_AuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler } -func request_AuthN_OAuthReturn_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_OAuthReturn_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq OAuthReturnRequest var metadata runtime.ServerMetadata @@ -361,7 +182,7 @@ func request_AuthN_OAuthReturn_0(ctx context.Context, marshaler runtime.Marshale } -func request_AuthN_ServiceConfiguration_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_ServiceConfiguration_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -370,7 +191,7 @@ func request_AuthN_ServiceConfiguration_0(ctx context.Context, marshaler runtime } -func request_AuthN_JWKS_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_JWKS_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -379,25 +200,7 @@ func request_AuthN_JWKS_0(ctx context.Context, marshaler runtime.Marshaler, clie } -func request_AuthN_ServiceStats_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty - var metadata runtime.ServerMetadata - - msg, err := client.ServiceStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_ServerStats_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty - var metadata runtime.ServerMetadata - - msg, err := client.ServerStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_HealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_HealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -406,9 +209,9 @@ func request_AuthN_HealthCheck_0(ctx context.Context, marshaler runtime.Marshale } -// RegisterAuthNHandlerFromEndpoint is same as RegisterAuthNHandler but +// RegisterPublicAuthNHandlerFromEndpoint is same as RegisterPublicAuthNHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterPublicAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err @@ -428,123 +231,23 @@ func RegisterAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux }() }() - return RegisterAuthNHandler(ctx, mux, conn) + return RegisterPublicAuthNHandler(ctx, mux, conn) } -// RegisterAuthNHandler registers the http handlers for service AuthN to "mux". +// RegisterPublicAuthNHandler registers the http handlers for service PublicAuthN to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAuthNHandlerClient(ctx, mux, NewAuthNClient(conn)) +func RegisterPublicAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPublicAuthNHandlerClient(ctx, mux, NewPublicAuthNClient(conn)) } -// RegisterAuthNHandlerClient registers the http handlers for service AuthN -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthNClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthNClient" +// RegisterPublicAuthNHandlerClient registers the http handlers for service PublicAuthN +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PublicAuthNClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PublicAuthNClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AuthNClient" to call the correct interceptors. -func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthNClient) error { - - mux.Handle("POST", pattern_AuthN_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_Signup_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_Signup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_GetAccount_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_GetAccount_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_GetAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_AuthN_UpdateAccount_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_UpdateAccount_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_UpdateAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_IsUsernameAvailable_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_IsUsernameAvailable_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_IsUsernameAvailable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_AuthN_LockAccount_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_LockAccount_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } +// "PublicAuthNClient" to call the correct interceptors. +func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PublicAuthNClient) error { - forward_AuthN_LockAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_AuthN_UnlockAcount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PublicAuthN_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) @@ -553,18 +256,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_UnlockAcount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_Signup_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_UnlockAcount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_Signup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_AuthN_ArchiveAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_IsUsernameAvailable_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) @@ -573,18 +276,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ArchiveAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_IsUsernameAvailable_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ArchiveAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_IsUsernameAvailable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AuthN_ImportAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PublicAuthN_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) @@ -593,18 +296,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ImportAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_Login_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ImportAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_Login_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AuthN_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_RefreshSession_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) @@ -613,18 +316,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_Login_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_RefreshSession_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_Login_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_RefreshSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_RefreshSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_PublicAuthN_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) @@ -633,18 +336,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_RefreshSession_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_Logout_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_RefreshSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_Logout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_AuthN_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_RequestPasswordReset_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) @@ -653,18 +356,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_Logout_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_RequestPasswordReset_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_Logout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_RequestPasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_RequestPasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PublicAuthN_ChangePassword_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) @@ -673,18 +376,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_RequestPasswordReset_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_ChangePassword_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_RequestPasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AuthN_ChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_BeginOAuth_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) @@ -693,18 +396,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ChangePassword_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_BeginOAuth_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_BeginOAuth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_AuthN_ExpirePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_OAuthReturn_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) @@ -713,18 +416,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ExpirePassword_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_OAuthReturn_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ExpirePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_OAuthReturn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_BeginOAuth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_ServiceConfiguration_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) @@ -733,18 +436,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_BeginOAuth_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_ServiceConfiguration_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_BeginOAuth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_ServiceConfiguration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_OAuthReturn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_JWKS_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) @@ -753,18 +456,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_OAuthReturn_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_JWKS_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_OAuthReturn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_JWKS_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_ServiceConfiguration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_HealthCheck_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) @@ -773,94 +476,14 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ServiceConfiguration_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_HealthCheck_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ServiceConfiguration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_JWKS_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_JWKS_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_JWKS_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_ServiceStats_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_ServiceStats_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_ServiceStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_ServerStats_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_ServerStats_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_ServerStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_HealthCheck_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_HealthCheck_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_HealthCheck_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_HealthCheck_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -868,89 +491,53 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_AuthN_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"accounts"}, "")) - - pattern_AuthN_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) - - pattern_AuthN_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) - - pattern_AuthN_IsUsernameAvailable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "available"}, "")) - - pattern_AuthN_LockAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "lock"}, "")) - - pattern_AuthN_UnlockAcount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "unlock"}, "")) - - pattern_AuthN_ArchiveAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) - - pattern_AuthN_ImportAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "import"}, "")) - - pattern_AuthN_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - - pattern_AuthN_RefreshSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) + pattern_PublicAuthN_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"accounts"}, "")) - pattern_AuthN_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) + pattern_PublicAuthN_IsUsernameAvailable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "available"}, "")) - pattern_AuthN_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"password", "reset"}, "")) + pattern_PublicAuthN_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - pattern_AuthN_ChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"password"}, "")) + pattern_PublicAuthN_RefreshSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - pattern_AuthN_ExpirePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "expire_password"}, "")) + pattern_PublicAuthN_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - pattern_AuthN_BeginOAuth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"oauth", "providerName"}, "")) + pattern_PublicAuthN_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"password", "reset"}, "")) - pattern_AuthN_OAuthReturn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"oauth", "providerName", "return"}, "")) + pattern_PublicAuthN_ChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"password"}, "")) - pattern_AuthN_ServiceConfiguration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"configuration"}, "")) + pattern_PublicAuthN_BeginOAuth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"oauth", "providerName"}, "")) - pattern_AuthN_JWKS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"jwks"}, "")) + pattern_PublicAuthN_OAuthReturn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"oauth", "providerName", "return"}, "")) - pattern_AuthN_ServiceStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"stats"}, "")) + pattern_PublicAuthN_ServiceConfiguration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"configuration"}, "")) - pattern_AuthN_ServerStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"metrics"}, "")) + pattern_PublicAuthN_JWKS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"jwks"}, "")) - pattern_AuthN_HealthCheck_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"health"}, "")) + pattern_PublicAuthN_HealthCheck_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"health"}, "")) ) var ( - forward_AuthN_Signup_0 = runtime.ForwardResponseMessage - - forward_AuthN_GetAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_UpdateAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_IsUsernameAvailable_0 = runtime.ForwardResponseMessage - - forward_AuthN_LockAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_UnlockAcount_0 = runtime.ForwardResponseMessage - - forward_AuthN_ArchiveAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_ImportAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_Login_0 = runtime.ForwardResponseMessage - - forward_AuthN_RefreshSession_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_Signup_0 = runtime.ForwardResponseMessage - forward_AuthN_Logout_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_IsUsernameAvailable_0 = runtime.ForwardResponseMessage - forward_AuthN_RequestPasswordReset_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_Login_0 = runtime.ForwardResponseMessage - forward_AuthN_ChangePassword_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_RefreshSession_0 = runtime.ForwardResponseMessage - forward_AuthN_ExpirePassword_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_Logout_0 = runtime.ForwardResponseMessage - forward_AuthN_BeginOAuth_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_RequestPasswordReset_0 = runtime.ForwardResponseMessage - forward_AuthN_OAuthReturn_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_ChangePassword_0 = runtime.ForwardResponseMessage - forward_AuthN_ServiceConfiguration_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_BeginOAuth_0 = runtime.ForwardResponseMessage - forward_AuthN_JWKS_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_OAuthReturn_0 = runtime.ForwardResponseMessage - forward_AuthN_ServiceStats_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_ServiceConfiguration_0 = runtime.ForwardResponseMessage - forward_AuthN_ServerStats_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_JWKS_0 = runtime.ForwardResponseMessage - forward_AuthN_HealthCheck_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_HealthCheck_0 = runtime.ForwardResponseMessage ) diff --git a/grpc/authn.pb_test.go b/grpc/authn.pb_test.go index 78dadc4e45..367f9ca1bd 100644 --- a/grpc/authn.pb_test.go +++ b/grpc/authn.pb_test.go @@ -1,8 +1,48 @@ package grpc import ( + "context" + "log" + "net" + "runtime" "testing" + + "google.golang.org/grpc" ) func TestServer(t *testing.T) { + + addr := "localhost:0" + lis, err := net.Listen("tcp", addr) + if err != nil { + log.Fatalf("failed to initializa TCP listen: %v", err) + } + defer lis.Close() + srv := NewServer(lis, nil) + + ctx := context.Background() + go srv.RunGRPC(ctx) + + runtime.Gosched() + + cc, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) + if err != nil { + t.Logf("failed to dial: %s", err) + t.FailNow() + } + + client := NewPublicAuthNClient(cc) + + signupForm := &SignupRequest{ + Username: "cool-username", + Password: "supersecurepassword", + } + + res, signErr := client.Signup(ctx, signupForm) + if signErr != nil { + t.Logf("failed to call Signup: %s", signErr) + t.FailNow() + } + t.Logf("%s", res) + } diff --git a/grpc/authn.proto b/grpc/authn.proto index 85ca226128..94a6b4c72e 100644 --- a/grpc/authn.proto +++ b/grpc/authn.proto @@ -18,42 +18,12 @@ message SignupResponse { message SignupResponseEnvelope { SignupResponse result = 1; } -message GetAccountRequest { string id = 1; } - -message GetAccountResponse { - int64 id = 1; - string username = 2; - bool locked = 3; - bool deleted = 4; -} - -message GetAccountResponseEnvelope { GetAccountResponse result = 1; } - -message UpdateAccountRequest { - string id = 1; - string username = 2; -} message IsUsernameAvailableRequest { string username = 1; } message IsUsernameAvailableResponseEnvelope { bool result = 1 [ (gogoproto.jsontag) = "result" ]; } -message LockAccountRequest { string id = 1; } - -message UnlockAccountRequest { string id = 1; } - -message ArchiveAccountRequest { string id = 1; } - -message ImportAccountRequst { - string username = 1; - string password = 2; - bool locked = 3; -} -message ImportAccountResponse { int64 id = 1 [ (gogoproto.jsontag) = "id" ]; } - -message ImportAccountResponseEnvelope { ImportAccountResponse result = 1; } - message LoginRequest { string username = 1; string password = 2; @@ -67,7 +37,6 @@ message ChangePasswordRequest { string currentPassword = 3; } -message ExpirePasswordRequest { string id = 1; } message BeginOAuthRequest { string providerName = 1; @@ -86,7 +55,6 @@ message Configuration { repeated string claims_supported = 5; string jwks_uri = 6; } -message ServiceStatsResponse {} message HealthCheckResponse { bool http = 1; @@ -104,7 +72,7 @@ message Key { } message JWKSResponse { repeated Key keys = 1; } -service AuthN { +service PublicAuthN { rpc Signup(SignupRequest) returns (SignupResponseEnvelope) { option (google.api.http) = { @@ -113,19 +81,6 @@ service AuthN { }; } - rpc GetAccount(GetAccountRequest) returns (GetAccountResponseEnvelope) { - option (google.api.http) = { - get : "/accounts/{id}", - }; - } - - rpc UpdateAccount(UpdateAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - put : "/accounts/{id}", - body : "username" - }; - } - rpc IsUsernameAvailable(IsUsernameAvailableRequest) returns (IsUsernameAvailableResponseEnvelope) { option (google.api.http) = { @@ -133,35 +88,7 @@ service AuthN { }; } - rpc LockAccount(LockAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - put : "/accounts/{id}/lock" - }; - } - - rpc UnlockAcount(UnlockAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - put : "/accounts/{id}/unlock" - }; - } - - rpc ArchiveAccount(ArchiveAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete : "/accounts/{id}" - }; - } - - rpc ImportAccount(ImportAccountRequst) - returns (ImportAccountResponseEnvelope) { - - option (google.api.http) = { - post : "/accounts/import", - body : "*" - }; - } - rpc Login(LoginRequest) returns (SignupResponse) { - option (google.api.http) = { post : "/session", body : "*" @@ -169,14 +96,12 @@ service AuthN { } rpc RefreshSession(google.protobuf.Empty) returns (SignupResponse) { - option (google.api.http) = { get : "/session" }; } rpc Logout(google.protobuf.Empty) returns (google.protobuf.Empty) { - option (google.api.http) = { delete : "/session" }; @@ -196,12 +121,6 @@ service AuthN { }; } - rpc ExpirePassword(ExpirePasswordRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - put : "/accounts/{id}/expire_password" - }; - } - rpc BeginOAuth(BeginOAuthRequest) returns (BeginOAuthResponse) { option (google.api.http) = { get : "/oauth/{providerName}" @@ -226,18 +145,6 @@ service AuthN { }; } - rpc ServiceStats(google.protobuf.Empty) returns (ServiceStatsResponse) { - option (google.api.http) = { - get : "/stats" - }; - } - - rpc ServerStats(google.protobuf.Empty) returns (google.protobuf.Empty) { - option (google.api.http) = { - get : "/metrics" - }; - } - rpc HealthCheck(google.protobuf.Empty) returns (HealthCheckResponse) { option (google.api.http) = { get : "/health"