Sponsor: remove Creem license key activation (#31824)
This commit is contained in:
parent
75cb289a61
commit
8b243c2a25
22 changed files with 104 additions and 534 deletions
|
|
@ -8,30 +8,19 @@ option go_package = "proto/pb";
|
||||||
|
|
||||||
service Auth {
|
service Auth {
|
||||||
rpc IsAuthorized (AuthRequest) returns (AuthReply) {}
|
rpc IsAuthorized (AuthRequest) returns (AuthReply) {}
|
||||||
rpc Activate (ActivateRequest) returns (ActivateReply) {}
|
|
||||||
rpc IsAuthorizedHardware (HardwareRequest) returns (HardwareReply) {}
|
rpc IsAuthorizedHardware (HardwareRequest) returns (HardwareReply) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
message AuthRequest {
|
message AuthRequest {
|
||||||
string token = 1;
|
string token = 1;
|
||||||
|
string machine_id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message AuthReply {
|
message AuthReply {
|
||||||
|
reserved 4; // was activation_key
|
||||||
bool authorized = 1;
|
bool authorized = 1;
|
||||||
string subject = 2;
|
string subject = 2;
|
||||||
google.protobuf.Timestamp expires_at = 3;
|
google.protobuf.Timestamp expires_at = 3;
|
||||||
string activation_key = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ActivateRequest {
|
|
||||||
string key = 1;
|
|
||||||
string email = 2;
|
|
||||||
string machine_id = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ActivateReply {
|
|
||||||
string token = 1;
|
|
||||||
string error = 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message HardwareRequest {
|
message HardwareRequest {
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.36.11
|
// protoc-gen-go v1.36.11
|
||||||
// protoc v7.34.1
|
// protoc v7.35.1
|
||||||
// source: proto/auth.proto
|
// source: proto/auth.proto
|
||||||
|
|
||||||
package pb
|
package pb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
unsafe "unsafe"
|
|
||||||
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
unsafe "unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -26,6 +25,7 @@ const (
|
||||||
type AuthRequest struct {
|
type AuthRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||||
|
MachineId string `protobuf:"bytes,2,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
@ -67,12 +67,18 @@ func (x *AuthRequest) GetToken() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *AuthRequest) GetMachineId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.MachineId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
type AuthReply struct {
|
type AuthReply struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
|
Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
|
||||||
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
|
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||||
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
|
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
|
||||||
ActivationKey string `protobuf:"bytes,4,opt,name=activation_key,json=activationKey,proto3" json:"activation_key,omitempty"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
@ -128,125 +134,6 @@ func (x *AuthReply) GetExpiresAt() *timestamppb.Timestamp {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AuthReply) GetActivationKey() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.ActivationKey
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type ActivateRequest struct {
|
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
|
||||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
||||||
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
|
|
||||||
MachineId string `protobuf:"bytes,3,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ActivateRequest) Reset() {
|
|
||||||
*x = ActivateRequest{}
|
|
||||||
mi := &file_proto_auth_proto_msgTypes[2]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ActivateRequest) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*ActivateRequest) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *ActivateRequest) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_proto_auth_proto_msgTypes[2]
|
|
||||||
if x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use ActivateRequest.ProtoReflect.Descriptor instead.
|
|
||||||
func (*ActivateRequest) Descriptor() ([]byte, []int) {
|
|
||||||
return file_proto_auth_proto_rawDescGZIP(), []int{2}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ActivateRequest) GetKey() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Key
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ActivateRequest) GetEmail() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Email
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ActivateRequest) GetMachineId() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.MachineId
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type ActivateReply struct {
|
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
|
||||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
||||||
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ActivateReply) Reset() {
|
|
||||||
*x = ActivateReply{}
|
|
||||||
mi := &file_proto_auth_proto_msgTypes[3]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ActivateReply) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*ActivateReply) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *ActivateReply) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_proto_auth_proto_msgTypes[3]
|
|
||||||
if x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use ActivateReply.ProtoReflect.Descriptor instead.
|
|
||||||
func (*ActivateReply) Descriptor() ([]byte, []int) {
|
|
||||||
return file_proto_auth_proto_rawDescGZIP(), []int{3}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ActivateReply) GetToken() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Token
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *ActivateReply) GetError() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Error
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type HardwareRequest struct {
|
type HardwareRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
MachineId string `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
|
MachineId string `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
|
||||||
|
|
@ -258,7 +145,7 @@ type HardwareRequest struct {
|
||||||
|
|
||||||
func (x *HardwareRequest) Reset() {
|
func (x *HardwareRequest) Reset() {
|
||||||
*x = HardwareRequest{}
|
*x = HardwareRequest{}
|
||||||
mi := &file_proto_auth_proto_msgTypes[4]
|
mi := &file_proto_auth_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -270,7 +157,7 @@ func (x *HardwareRequest) String() string {
|
||||||
func (*HardwareRequest) ProtoMessage() {}
|
func (*HardwareRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *HardwareRequest) ProtoReflect() protoreflect.Message {
|
func (x *HardwareRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_proto_auth_proto_msgTypes[4]
|
mi := &file_proto_auth_proto_msgTypes[2]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -283,7 +170,7 @@ func (x *HardwareRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use HardwareRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use HardwareRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*HardwareRequest) Descriptor() ([]byte, []int) {
|
func (*HardwareRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_proto_auth_proto_rawDescGZIP(), []int{4}
|
return file_proto_auth_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HardwareRequest) GetMachineId() string {
|
func (x *HardwareRequest) GetMachineId() string {
|
||||||
|
|
@ -317,7 +204,7 @@ type HardwareReply struct {
|
||||||
|
|
||||||
func (x *HardwareReply) Reset() {
|
func (x *HardwareReply) Reset() {
|
||||||
*x = HardwareReply{}
|
*x = HardwareReply{}
|
||||||
mi := &file_proto_auth_proto_msgTypes[5]
|
mi := &file_proto_auth_proto_msgTypes[3]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -329,7 +216,7 @@ func (x *HardwareReply) String() string {
|
||||||
func (*HardwareReply) ProtoMessage() {}
|
func (*HardwareReply) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *HardwareReply) ProtoReflect() protoreflect.Message {
|
func (x *HardwareReply) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_proto_auth_proto_msgTypes[5]
|
mi := &file_proto_auth_proto_msgTypes[3]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -342,7 +229,7 @@ func (x *HardwareReply) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use HardwareReply.ProtoReflect.Descriptor instead.
|
// Deprecated: Use HardwareReply.ProtoReflect.Descriptor instead.
|
||||||
func (*HardwareReply) Descriptor() ([]byte, []int) {
|
func (*HardwareReply) Descriptor() ([]byte, []int) {
|
||||||
return file_proto_auth_proto_rawDescGZIP(), []int{5}
|
return file_proto_auth_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HardwareReply) GetAuthorized() bool {
|
func (x *HardwareReply) GetAuthorized() bool {
|
||||||
|
|
@ -363,25 +250,18 @@ var File_proto_auth_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
const file_proto_auth_proto_rawDesc = "" +
|
const file_proto_auth_proto_rawDesc = "" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"\x10proto/auth.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"#\n" +
|
"\x10proto/auth.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"B\n" +
|
||||||
"\vAuthRequest\x12\x14\n" +
|
"\vAuthRequest\x12\x14\n" +
|
||||||
"\x05token\x18\x01 \x01(\tR\x05token\"\xa7\x01\n" +
|
"\x05token\x18\x01 \x01(\tR\x05token\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"machine_id\x18\x02 \x01(\tR\tmachineId\"\x86\x01\n" +
|
||||||
"\tAuthReply\x12\x1e\n" +
|
"\tAuthReply\x12\x1e\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"authorized\x18\x01 \x01(\bR\n" +
|
"authorized\x18\x01 \x01(\bR\n" +
|
||||||
"authorized\x12\x18\n" +
|
"authorized\x12\x18\n" +
|
||||||
"\asubject\x18\x02 \x01(\tR\asubject\x129\n" +
|
"\asubject\x18\x02 \x01(\tR\asubject\x129\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"expires_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x12%\n" +
|
"expires_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAtJ\x04\b\x04\x10\x05\"\xc1\x01\n" +
|
||||||
"\x0eactivation_key\x18\x04 \x01(\tR\ractivationKey\"X\n" +
|
|
||||||
"\x0fActivateRequest\x12\x10\n" +
|
|
||||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
||||||
"\x05email\x18\x02 \x01(\tR\x05email\x12\x1d\n" +
|
|
||||||
"\n" +
|
|
||||||
"machine_id\x18\x03 \x01(\tR\tmachineId\";\n" +
|
|
||||||
"\rActivateReply\x12\x14\n" +
|
|
||||||
"\x05token\x18\x01 \x01(\tR\x05token\x12\x14\n" +
|
|
||||||
"\x05error\x18\x02 \x01(\tR\x05error\"\xc1\x01\n" +
|
|
||||||
"\x0fHardwareRequest\x12\x1d\n" +
|
"\x0fHardwareRequest\x12\x1d\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"machine_id\x18\x01 \x01(\tR\tmachineId\x12\x16\n" +
|
"machine_id\x18\x01 \x01(\tR\tmachineId\x12\x16\n" +
|
||||||
|
|
@ -394,11 +274,10 @@ const file_proto_auth_proto_rawDesc = "" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"authorized\x18\x01 \x01(\bR\n" +
|
"authorized\x18\x01 \x01(\bR\n" +
|
||||||
"authorized\x12\x18\n" +
|
"authorized\x12\x18\n" +
|
||||||
"\asubject\x18\x02 \x01(\tR\asubject2\x9e\x01\n" +
|
"\asubject\x18\x02 \x01(\tR\asubject2n\n" +
|
||||||
"\x04Auth\x12*\n" +
|
"\x04Auth\x12*\n" +
|
||||||
"\fIsAuthorized\x12\f.AuthRequest\x1a\n" +
|
"\fIsAuthorized\x12\f.AuthRequest\x1a\n" +
|
||||||
".AuthReply\"\x00\x12.\n" +
|
".AuthReply\"\x00\x12:\n" +
|
||||||
"\bActivate\x12\x10.ActivateRequest\x1a\x0e.ActivateReply\"\x00\x12:\n" +
|
|
||||||
"\x14IsAuthorizedHardware\x12\x10.HardwareRequest\x1a\x0e.HardwareReply\"\x00B\n" +
|
"\x14IsAuthorizedHardware\x12\x10.HardwareRequest\x1a\x0e.HardwareReply\"\x00B\n" +
|
||||||
"Z\bproto/pbb\x06proto3"
|
"Z\bproto/pbb\x06proto3"
|
||||||
|
|
||||||
|
|
@ -414,28 +293,24 @@ func file_proto_auth_proto_rawDescGZIP() []byte {
|
||||||
return file_proto_auth_proto_rawDescData
|
return file_proto_auth_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_proto_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
var file_proto_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||||
var file_proto_auth_proto_goTypes = []any{
|
var file_proto_auth_proto_goTypes = []any{
|
||||||
(*AuthRequest)(nil), // 0: AuthRequest
|
(*AuthRequest)(nil), // 0: AuthRequest
|
||||||
(*AuthReply)(nil), // 1: AuthReply
|
(*AuthReply)(nil), // 1: AuthReply
|
||||||
(*ActivateRequest)(nil), // 2: ActivateRequest
|
(*HardwareRequest)(nil), // 2: HardwareRequest
|
||||||
(*ActivateReply)(nil), // 3: ActivateReply
|
(*HardwareReply)(nil), // 3: HardwareReply
|
||||||
(*HardwareRequest)(nil), // 4: HardwareRequest
|
nil, // 4: HardwareRequest.MetadataEntry
|
||||||
(*HardwareReply)(nil), // 5: HardwareReply
|
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
|
||||||
nil, // 6: HardwareRequest.MetadataEntry
|
|
||||||
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
|
|
||||||
}
|
}
|
||||||
var file_proto_auth_proto_depIdxs = []int32{
|
var file_proto_auth_proto_depIdxs = []int32{
|
||||||
7, // 0: AuthReply.expires_at:type_name -> google.protobuf.Timestamp
|
5, // 0: AuthReply.expires_at:type_name -> google.protobuf.Timestamp
|
||||||
6, // 1: HardwareRequest.metadata:type_name -> HardwareRequest.MetadataEntry
|
4, // 1: HardwareRequest.metadata:type_name -> HardwareRequest.MetadataEntry
|
||||||
0, // 2: Auth.IsAuthorized:input_type -> AuthRequest
|
0, // 2: Auth.IsAuthorized:input_type -> AuthRequest
|
||||||
2, // 3: Auth.Activate:input_type -> ActivateRequest
|
2, // 3: Auth.IsAuthorizedHardware:input_type -> HardwareRequest
|
||||||
4, // 4: Auth.IsAuthorizedHardware:input_type -> HardwareRequest
|
1, // 4: Auth.IsAuthorized:output_type -> AuthReply
|
||||||
1, // 5: Auth.IsAuthorized:output_type -> AuthReply
|
3, // 5: Auth.IsAuthorizedHardware:output_type -> HardwareReply
|
||||||
3, // 6: Auth.Activate:output_type -> ActivateReply
|
4, // [4:6] is the sub-list for method output_type
|
||||||
5, // 7: Auth.IsAuthorizedHardware:output_type -> HardwareReply
|
2, // [2:4] is the sub-list for method input_type
|
||||||
5, // [5:8] is the sub-list for method output_type
|
|
||||||
2, // [2:5] is the sub-list for method input_type
|
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
2, // [2:2] is the sub-list for extension extendee
|
||||||
0, // [0:2] is the sub-list for field type_name
|
0, // [0:2] is the sub-list for field type_name
|
||||||
|
|
@ -452,7 +327,7 @@ func file_proto_auth_proto_init() {
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_auth_proto_rawDesc), len(file_proto_auth_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_auth_proto_rawDesc), len(file_proto_auth_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 7,
|
NumMessages: 5,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.6.1
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
// - protoc v7.34.1
|
// - protoc v7.35.1
|
||||||
// source: proto/auth.proto
|
// source: proto/auth.proto
|
||||||
|
|
||||||
package pb
|
package pb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
|
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
codes "google.golang.org/grpc/codes"
|
codes "google.golang.org/grpc/codes"
|
||||||
status "google.golang.org/grpc/status"
|
status "google.golang.org/grpc/status"
|
||||||
|
|
@ -21,7 +20,6 @@ const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Auth_IsAuthorized_FullMethodName = "/Auth/IsAuthorized"
|
Auth_IsAuthorized_FullMethodName = "/Auth/IsAuthorized"
|
||||||
Auth_Activate_FullMethodName = "/Auth/Activate"
|
|
||||||
Auth_IsAuthorizedHardware_FullMethodName = "/Auth/IsAuthorizedHardware"
|
Auth_IsAuthorizedHardware_FullMethodName = "/Auth/IsAuthorizedHardware"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -30,7 +28,6 @@ const (
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
type AuthClient interface {
|
type AuthClient interface {
|
||||||
IsAuthorized(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error)
|
IsAuthorized(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error)
|
||||||
Activate(ctx context.Context, in *ActivateRequest, opts ...grpc.CallOption) (*ActivateReply, error)
|
|
||||||
IsAuthorizedHardware(ctx context.Context, in *HardwareRequest, opts ...grpc.CallOption) (*HardwareReply, error)
|
IsAuthorizedHardware(ctx context.Context, in *HardwareRequest, opts ...grpc.CallOption) (*HardwareReply, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,16 +49,6 @@ func (c *authClient) IsAuthorized(ctx context.Context, in *AuthRequest, opts ...
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *authClient) Activate(ctx context.Context, in *ActivateRequest, opts ...grpc.CallOption) (*ActivateReply, error) {
|
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(ActivateReply)
|
|
||||||
err := c.cc.Invoke(ctx, Auth_Activate_FullMethodName, in, out, cOpts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *authClient) IsAuthorizedHardware(ctx context.Context, in *HardwareRequest, opts ...grpc.CallOption) (*HardwareReply, error) {
|
func (c *authClient) IsAuthorizedHardware(ctx context.Context, in *HardwareRequest, opts ...grpc.CallOption) (*HardwareReply, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
out := new(HardwareReply)
|
out := new(HardwareReply)
|
||||||
|
|
@ -77,7 +64,6 @@ func (c *authClient) IsAuthorizedHardware(ctx context.Context, in *HardwareReque
|
||||||
// for forward compatibility.
|
// for forward compatibility.
|
||||||
type AuthServer interface {
|
type AuthServer interface {
|
||||||
IsAuthorized(context.Context, *AuthRequest) (*AuthReply, error)
|
IsAuthorized(context.Context, *AuthRequest) (*AuthReply, error)
|
||||||
Activate(context.Context, *ActivateRequest) (*ActivateReply, error)
|
|
||||||
IsAuthorizedHardware(context.Context, *HardwareRequest) (*HardwareReply, error)
|
IsAuthorizedHardware(context.Context, *HardwareRequest) (*HardwareReply, error)
|
||||||
mustEmbedUnimplementedAuthServer()
|
mustEmbedUnimplementedAuthServer()
|
||||||
}
|
}
|
||||||
|
|
@ -92,9 +78,6 @@ type UnimplementedAuthServer struct{}
|
||||||
func (UnimplementedAuthServer) IsAuthorized(context.Context, *AuthRequest) (*AuthReply, error) {
|
func (UnimplementedAuthServer) IsAuthorized(context.Context, *AuthRequest) (*AuthReply, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method IsAuthorized not implemented")
|
return nil, status.Error(codes.Unimplemented, "method IsAuthorized not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedAuthServer) Activate(context.Context, *ActivateRequest) (*ActivateReply, error) {
|
|
||||||
return nil, status.Error(codes.Unimplemented, "method Activate not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedAuthServer) IsAuthorizedHardware(context.Context, *HardwareRequest) (*HardwareReply, error) {
|
func (UnimplementedAuthServer) IsAuthorizedHardware(context.Context, *HardwareRequest) (*HardwareReply, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method IsAuthorizedHardware not implemented")
|
return nil, status.Error(codes.Unimplemented, "method IsAuthorizedHardware not implemented")
|
||||||
}
|
}
|
||||||
|
|
@ -137,24 +120,6 @@ func _Auth_IsAuthorized_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Auth_Activate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(ActivateRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(AuthServer).Activate(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: Auth_Activate_FullMethodName,
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(AuthServer).Activate(ctx, req.(*ActivateRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Auth_IsAuthorizedHardware_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Auth_IsAuthorizedHardware_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(HardwareRequest)
|
in := new(HardwareRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
|
|
@ -184,10 +149,6 @@ var Auth_ServiceDesc = grpc.ServiceDesc{
|
||||||
MethodName: "IsAuthorized",
|
MethodName: "IsAuthorized",
|
||||||
Handler: _Auth_IsAuthorized_Handler,
|
Handler: _Auth_IsAuthorized_Handler,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
MethodName: "Activate",
|
|
||||||
Handler: _Auth_Activate_Handler,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
MethodName: "IsAuthorizedHardware",
|
MethodName: "IsAuthorizedHardware",
|
||||||
Handler: _Auth_IsAuthorizedHardware_Handler,
|
Handler: _Auth_IsAuthorizedHardware_Handler,
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,7 @@
|
||||||
:disable-remove="!hasUiToken"
|
:disable-remove="!hasUiToken"
|
||||||
disable-cancel
|
disable-cancel
|
||||||
@changed="$emit('changed')"
|
@changed="$emit('changed')"
|
||||||
@open="
|
@open="showForm = false"
|
||||||
showForm = false;
|
|
||||||
activeTab = 'github';
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<template #default="{ values }">
|
<template #default="{ values }">
|
||||||
<div class="mt-4 mb-3">
|
<div class="mt-4 mb-3">
|
||||||
|
|
@ -22,104 +19,28 @@
|
||||||
</div>
|
</div>
|
||||||
<hr class="my-4" />
|
<hr class="my-4" />
|
||||||
<div v-if="showTokenForm">
|
<div v-if="showTokenForm">
|
||||||
<!-- hidden feature: tab navigation
|
<label for="sponsorToken" class="my-2">
|
||||||
<ul v-if="$hiddenFeatures()" class="nav nav-tabs mb-3" role="tablist">
|
{{ $t("config.sponsor.enterYourToken") }}
|
||||||
<li class="nav-item" role="presentation">
|
</label>
|
||||||
<button
|
<textarea
|
||||||
class="nav-link"
|
id="sponsorToken"
|
||||||
:class="{ active: activeTab === 'github' }"
|
v-model.trim="values.token"
|
||||||
type="button"
|
class="form-control mb-1"
|
||||||
@click="
|
required
|
||||||
if (activeTab !== 'github') {
|
rows="5"
|
||||||
values.token = '';
|
spellcheck="false"
|
||||||
values.email = '';
|
@paste="(event) => handlePaste(event, values)"
|
||||||
}
|
/>
|
||||||
activeTab = 'github';
|
<i18n-t tag="small" keypath="config.sponsor.descriptionToken" scope="global">
|
||||||
"
|
<template #url>
|
||||||
>
|
<a href="https://sponsor.evcc.io" target="_blank">sponsor.evcc.io</a>
|
||||||
Sponsor Token
|
</template>
|
||||||
</button>
|
<template #trialToken>
|
||||||
</li>
|
<a :href="trialTokenLink" target="_blank">{{
|
||||||
<li class="nav-item" role="presentation">
|
$t("config.sponsor.trialToken")
|
||||||
<button
|
}}</a>
|
||||||
class="nav-link"
|
</template>
|
||||||
:class="{ active: activeTab === 'direct' }"
|
</i18n-t>
|
||||||
type="button"
|
|
||||||
@click="
|
|
||||||
if (activeTab !== 'direct') {
|
|
||||||
values.token = '';
|
|
||||||
values.email = '';
|
|
||||||
}
|
|
||||||
activeTab = 'direct';
|
|
||||||
"
|
|
||||||
>
|
|
||||||
Activation Key 🧪
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
-->
|
|
||||||
<div v-if="activeTab === 'github'">
|
|
||||||
<label for="sponsorToken" class="my-2">
|
|
||||||
{{ $t("config.sponsor.enterYourToken") }}
|
|
||||||
</label>
|
|
||||||
<textarea
|
|
||||||
id="sponsorToken"
|
|
||||||
v-model.trim="values.token"
|
|
||||||
class="form-control mb-1"
|
|
||||||
required
|
|
||||||
rows="5"
|
|
||||||
spellcheck="false"
|
|
||||||
@paste="(event) => handlePaste(event, values)"
|
|
||||||
/>
|
|
||||||
<i18n-t tag="small" keypath="config.sponsor.descriptionToken" scope="global">
|
|
||||||
<template #url>
|
|
||||||
<a href="https://sponsor.evcc.io" target="_blank">sponsor.evcc.io</a>
|
|
||||||
</template>
|
|
||||||
<template #trialToken>
|
|
||||||
<a :href="trialTokenLink" target="_blank">{{
|
|
||||||
$t("config.sponsor.trialToken")
|
|
||||||
}}</a>
|
|
||||||
</template>
|
|
||||||
</i18n-t>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="activeTab === 'direct'">
|
|
||||||
<label for="sponsorEmail" class="my-2">{{ $t("config.sponsor.email") }}</label>
|
|
||||||
<input
|
|
||||||
id="sponsorEmail"
|
|
||||||
v-model.trim="values.email"
|
|
||||||
type="email"
|
|
||||||
class="form-control mb-1"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<i18n-t
|
|
||||||
tag="small"
|
|
||||||
keypath="config.sponsor.emailHint"
|
|
||||||
scope="global"
|
|
||||||
class="mb-3 d-block text-muted"
|
|
||||||
>
|
|
||||||
<template #url>
|
|
||||||
<a href="https://sponsor.evcc.io/" target="_blank">direct sponsoring</a>
|
|
||||||
</template>
|
|
||||||
</i18n-t>
|
|
||||||
<label for="licenseKey" class="my-2">{{
|
|
||||||
$t("config.sponsor.activationKey")
|
|
||||||
}}</label>
|
|
||||||
<input
|
|
||||||
id="licenseKey"
|
|
||||||
v-model.trim="values.token"
|
|
||||||
class="form-control mb-1 font-monospace"
|
|
||||||
required
|
|
||||||
spellcheck="false"
|
|
||||||
pattern="[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}"
|
|
||||||
title="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
|
|
||||||
@input="values.token = values.token.toUpperCase()"
|
|
||||||
/>
|
|
||||||
<i18n-t tag="small" keypath="config.sponsor.activationKeyHint" scope="global">
|
|
||||||
<template #url>
|
|
||||||
<a href="about:blank" target="_blank">Customer Portal</a>
|
|
||||||
</template>
|
|
||||||
</i18n-t>
|
|
||||||
</div>
|
|
||||||
<div v-if="hasUiToken" class="d-flex justify-content-end mt-3">
|
<div v-if="hasUiToken" class="d-flex justify-content-end mt-3">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
@ -127,7 +48,6 @@
|
||||||
@click="
|
@click="
|
||||||
editMode = false;
|
editMode = false;
|
||||||
values.token = '';
|
values.token = '';
|
||||||
values.email = '';
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ $t("config.general.cancel") }}
|
{{ $t("config.general.cancel") }}
|
||||||
|
|
@ -135,64 +55,32 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="token">
|
<div v-else-if="token">
|
||||||
<div v-if="activationKey">
|
<label for="existingToken" class="fw-bold my-2">{{
|
||||||
<label for="existingEmail" class="fw-bold my-2">{{
|
$t("config.sponsor.yourToken")
|
||||||
$t("config.sponsor.email")
|
}}</label>
|
||||||
}}</label>
|
<div class="text-muted">
|
||||||
<div class="text-muted mb-3">
|
<input
|
||||||
<input id="existingEmail" :value="name" disabled class="form-control" />
|
id="existingToken"
|
||||||
</div>
|
:value="token"
|
||||||
<label for="existingActivationKey" class="fw-bold my-2">{{
|
disabled
|
||||||
$t("config.sponsor.activationKey")
|
rows="1"
|
||||||
}}</label>
|
class="form-control"
|
||||||
<div class="text-muted">
|
:class="{ 'is-invalid': error }"
|
||||||
<input
|
/>
|
||||||
id="existingActivationKey"
|
|
||||||
:value="activationKey"
|
|
||||||
disabled
|
|
||||||
class="form-control font-monospace"
|
|
||||||
:class="{ 'is-invalid': error }"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex justify-content-end mt-2">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-link text-nowrap"
|
|
||||||
:class="error ? 'text-danger' : 'text-muted'"
|
|
||||||
@click="editMode = true"
|
|
||||||
>
|
|
||||||
{{ $t("config.general.change") }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div class="d-flex justify-content-end mt-2">
|
||||||
<label for="existingToken" class="fw-bold my-2">{{
|
<span v-if="fromYaml" class="text-nowrap small text-muted">
|
||||||
$t("config.sponsor.yourToken")
|
{{ $t("config.sponsor.viaYaml") }}
|
||||||
}}</label>
|
</span>
|
||||||
<div class="text-muted">
|
<button
|
||||||
<input
|
v-else
|
||||||
id="existingToken"
|
type="button"
|
||||||
:value="token"
|
class="btn btn-link text-nowrap"
|
||||||
disabled
|
:class="error ? 'text-danger' : 'text-muted'"
|
||||||
rows="1"
|
@click="editMode = true"
|
||||||
class="form-control"
|
>
|
||||||
:class="{ 'is-invalid': error }"
|
{{ $t("config.sponsor.changeToken") }}
|
||||||
/>
|
</button>
|
||||||
</div>
|
|
||||||
<div class="d-flex justify-content-end mt-2">
|
|
||||||
<span v-if="fromYaml" class="text-nowrap small text-muted">
|
|
||||||
{{ $t("config.sponsor.viaYaml") }}
|
|
||||||
</span>
|
|
||||||
<button
|
|
||||||
v-else
|
|
||||||
type="button"
|
|
||||||
class="btn btn-link text-nowrap"
|
|
||||||
:class="error ? 'text-danger' : 'text-muted'"
|
|
||||||
@click="editMode = true"
|
|
||||||
>
|
|
||||||
{{ $t("config.sponsor.changeToken") }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<SponsorTokenExpires v-bind="sponsor" />
|
<SponsorTokenExpires v-bind="sponsor" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -216,7 +104,6 @@ export default {
|
||||||
emits: ["changed"],
|
emits: ["changed"],
|
||||||
data: () => ({
|
data: () => ({
|
||||||
editMode: false,
|
editMode: false,
|
||||||
activeTab: "github",
|
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
sponsor() {
|
sponsor() {
|
||||||
|
|
@ -225,9 +112,6 @@ export default {
|
||||||
token() {
|
token() {
|
||||||
return this.sponsor?.status?.token;
|
return this.sponsor?.status?.token;
|
||||||
},
|
},
|
||||||
activationKey() {
|
|
||||||
return this.sponsor?.status?.activationKey;
|
|
||||||
},
|
|
||||||
fromYaml() {
|
fromYaml() {
|
||||||
return !!this.sponsor?.yamlSource;
|
return !!this.sponsor?.yamlSource;
|
||||||
},
|
},
|
||||||
|
|
@ -249,21 +133,12 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
transformReadValues() {
|
transformReadValues() {
|
||||||
return { token: "", email: "" };
|
return { token: "" };
|
||||||
},
|
},
|
||||||
handlePaste(event, values) {
|
handlePaste(event, values) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const text = event.clipboardData.getData("text");
|
const text = event.clipboardData.getData("text");
|
||||||
const cleaned = cleanYaml(text, "sponsortoken");
|
values.token = cleanYaml(text, "sponsortoken");
|
||||||
values.token = cleaned;
|
|
||||||
if (this.activeTab === "github" && this.isLicenseKey(cleaned)) {
|
|
||||||
this.activeTab = "direct";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isLicenseKey(token) {
|
|
||||||
// Match pattern XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (case-insensitive alphanumeric)
|
|
||||||
const pattern = /^[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}$/i;
|
|
||||||
return pattern.test(token || "");
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -744,14 +744,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Licenční klíč",
|
|
||||||
"activationKeyHint": "Odesláno e-mailem. Najdete na adrese {url}.",
|
|
||||||
"addToken": "Zadejte token",
|
"addToken": "Zadejte token",
|
||||||
"changeToken": "Změnit token",
|
"changeToken": "Změnit token",
|
||||||
"description": "Sponzorský model nám pomáhá udržovat projekt a udržitelně vyvíjet nové a vzrušující funkce. Jako sponzor získáte přístup ke všem implementacím nabíječek.",
|
"description": "Sponzorský model nám pomáhá udržovat projekt a udržitelně vyvíjet nové a vzrušující funkce. Jako sponzor získáte přístup ke všem implementacím nabíječek.",
|
||||||
"descriptionToken": "Sponzorský token získáte na {url}. Pro začátek nabízíme také zkušební token {trialToken}.",
|
"descriptionToken": "Sponzorský token získáte na {url}. Pro začátek nabízíme také zkušební token {trialToken}.",
|
||||||
"email": "E-mail",
|
|
||||||
"emailHint": "E-mailová adresa, kterou jste použili pro {url}",
|
|
||||||
"enterYourToken": "Váš sponzorský token",
|
"enterYourToken": "Váš sponzorský token",
|
||||||
"error": "Sponzorský token není platný.",
|
"error": "Sponzorský token není platný.",
|
||||||
"invalid": "Neplatný sponzorský token",
|
"invalid": "Neplatný sponzorský token",
|
||||||
|
|
|
||||||
|
|
@ -779,14 +779,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Licensnøgle",
|
|
||||||
"activationKeyHint": "Er sendt via email. Findes i {url}.",
|
|
||||||
"addToken": "Indtast token",
|
"addToken": "Indtast token",
|
||||||
"changeToken": "Udskift token",
|
"changeToken": "Udskift token",
|
||||||
"description": "Sponsormodellen hjælper os med at vedligeholde projektet og bæredygtigt bygge nye og spændende funktioner. Som sponsor får du adgang til alle opladning mulighederne.",
|
"description": "Sponsormodellen hjælper os med at vedligeholde projektet og bæredygtigt bygge nye og spændende funktioner. Som sponsor får du adgang til alle opladning mulighederne.",
|
||||||
"descriptionToken": "Som GitHub sponsor finder du din token på {url}. For at komme i gang tilbyder vi en {trialToken}.",
|
"descriptionToken": "Som GitHub sponsor finder du din token på {url}. For at komme i gang tilbyder vi en {trialToken}.",
|
||||||
"email": "Email",
|
|
||||||
"emailHint": "Den email adresse du benyttede for {url}",
|
|
||||||
"enterYourToken": "Din Sponsor token",
|
"enterYourToken": "Din Sponsor token",
|
||||||
"error": "Dit Sponsortoken er ikke gyldigt.",
|
"error": "Dit Sponsortoken er ikke gyldigt.",
|
||||||
"invalid": "ugyldig",
|
"invalid": "ugyldig",
|
||||||
|
|
|
||||||
|
|
@ -840,14 +840,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Lizenzschlüssel",
|
|
||||||
"activationKeyHint": "Per E-Mail zugesandt. Kann im {url} gefunden werden.",
|
|
||||||
"addToken": "Token eingeben",
|
"addToken": "Token eingeben",
|
||||||
"changeToken": "Token ändern",
|
"changeToken": "Token ändern",
|
||||||
"description": "Das Sponsoring-Modell hilft uns, das Projekt zu pflegen und nachhaltig neue und spannende Funktionen zu entwickeln. Als Sponsor erhältst du Zugriff auf alle Wallbox-Implementierungen.",
|
"description": "Das Sponsoring-Modell hilft uns, das Projekt zu pflegen und nachhaltig neue und spannende Funktionen zu entwickeln. Als Sponsor erhältst du Zugriff auf alle Wallbox-Implementierungen.",
|
||||||
"descriptionToken": "Als GitHub-Sponsor findest du dein Token auf {url}. Zum Ausprobieren gibt's ein {trialToken}.",
|
"descriptionToken": "Als GitHub-Sponsor findest du dein Token auf {url}. Zum Ausprobieren gibt's ein {trialToken}.",
|
||||||
"email": "E-Mail",
|
|
||||||
"emailHint": "E-Mail-Adresse, die du für {url} verwendet hast",
|
|
||||||
"enterYourToken": "Dein Sponsor Token",
|
"enterYourToken": "Dein Sponsor Token",
|
||||||
"error": "Das Sponsortoken ist ungültig.",
|
"error": "Das Sponsortoken ist ungültig.",
|
||||||
"invalid": "ungültig",
|
"invalid": "ungültig",
|
||||||
|
|
|
||||||
|
|
@ -840,14 +840,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "License Key",
|
|
||||||
"activationKeyHint": "Sent to you via email. Can be found in the {url}.",
|
|
||||||
"addToken": "Enter token",
|
"addToken": "Enter token",
|
||||||
"changeToken": "Change token",
|
"changeToken": "Change token",
|
||||||
"description": "The sponsoring model helps us to maintain the project and sustainably build new and exciting features. As a sponsor you get access to all charger implementations.",
|
"description": "The sponsoring model helps us to maintain the project and sustainably build new and exciting features. As a sponsor you get access to all charger implementations.",
|
||||||
"descriptionToken": "As GitHub Sponsor you find your token on {url}. For getting-started, we offer a {trialToken}.",
|
"descriptionToken": "As GitHub Sponsor you find your token on {url}. For getting-started, we offer a {trialToken}.",
|
||||||
"email": "Email",
|
|
||||||
"emailHint": "Email address you used for {url}",
|
|
||||||
"enterYourToken": "Your Sponsor Token",
|
"enterYourToken": "Your Sponsor Token",
|
||||||
"error": "The sponsor token is not valid.",
|
"error": "The sponsor token is not valid.",
|
||||||
"invalid": "invalid",
|
"invalid": "invalid",
|
||||||
|
|
|
||||||
|
|
@ -778,14 +778,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Lisenssiavain",
|
|
||||||
"activationKeyHint": "Lähetetty sähköpostitse. Löytyy osoitteesta {url}.",
|
|
||||||
"addToken": "Anna tunnus",
|
"addToken": "Anna tunnus",
|
||||||
"changeToken": "Vaihda tunnus",
|
"changeToken": "Vaihda tunnus",
|
||||||
"description": "Sponsorointi auttaa meitä ylläpitämään projektia ja rakentamaan kestävästi uusia ja jännittäviä ominaisuuksia. Sponsorina saat käyttöösi kaikki latureiden toteutukset.",
|
"description": "Sponsorointi auttaa meitä ylläpitämään projektia ja rakentamaan kestävästi uusia ja jännittäviä ominaisuuksia. Sponsorina saat käyttöösi kaikki latureiden toteutukset.",
|
||||||
"descriptionToken": "GitHub-sponsorina löydät sponsorointitunnuksesi osoitteesta {url}. Päästäksesi alkuun tarjoamme {trialToken}.",
|
"descriptionToken": "GitHub-sponsorina löydät sponsorointitunnuksesi osoitteesta {url}. Päästäksesi alkuun tarjoamme {trialToken}.",
|
||||||
"email": "Sähköposti",
|
|
||||||
"emailHint": "Sähköpostiosoite, jota käytit {url}:een",
|
|
||||||
"enterYourToken": "Sponsorointitunnuksesi",
|
"enterYourToken": "Sponsorointitunnuksesi",
|
||||||
"error": "Sponsoritunnus ei kelpaa.",
|
"error": "Sponsoritunnus ei kelpaa.",
|
||||||
"invalid": "epäkelpo",
|
"invalid": "epäkelpo",
|
||||||
|
|
|
||||||
|
|
@ -782,14 +782,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Clé de licence",
|
|
||||||
"activationKeyHint": "Vous a été envoyé par email. Peut être trouvé via {url}.",
|
|
||||||
"addToken": "Entrer le jeton",
|
"addToken": "Entrer le jeton",
|
||||||
"changeToken": "Modifier le jeton",
|
"changeToken": "Modifier le jeton",
|
||||||
"description": "Le modèle de parrainage nous aide à maintenir le projet et à construire de manière durable de nouvelles fonctionnalités passionnantes. En tant que parrain, vous avez accès à toutes les implémentations de chargeurs.",
|
"description": "Le modèle de parrainage nous aide à maintenir le projet et à construire de manière durable de nouvelles fonctionnalités passionnantes. En tant que parrain, vous avez accès à toutes les implémentations de chargeurs.",
|
||||||
"descriptionToken": "En tant que sponsor GitHub, vous pouvez obtenir un jeton sur {url}. Pour démarrer, nous offrons également un jeton d’essai pour les tests {trialToken}.",
|
"descriptionToken": "En tant que sponsor GitHub, vous pouvez obtenir un jeton sur {url}. Pour démarrer, nous offrons également un jeton d’essai pour les tests {trialToken}.",
|
||||||
"email": "Email",
|
|
||||||
"emailHint": "L’adresse email que vous avez utilisé pour {url}",
|
|
||||||
"enterYourToken": "Votre jeton de sponsor",
|
"enterYourToken": "Votre jeton de sponsor",
|
||||||
"error": "Le jeton de parrain n’est pas valide.",
|
"error": "Le jeton de parrain n’est pas valide.",
|
||||||
"invalid": "invalide",
|
"invalid": "invalide",
|
||||||
|
|
|
||||||
|
|
@ -691,14 +691,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Chiave di licenza",
|
|
||||||
"activationKeyHint": "Inviata via mail. Puoi trovarla in{url}.",
|
|
||||||
"addToken": "Inserisci il token",
|
"addToken": "Inserisci il token",
|
||||||
"changeToken": "Modifica il token",
|
"changeToken": "Modifica il token",
|
||||||
"description": "Il modello di sponsorizzazione ci aiuta a mantenere il progetto e a introdurre in modo sostenibile nuove ed entusiasmanti funzionalità. Come sponsor hai accesso a tutte le implementazioni del caricabatterie.",
|
"description": "Il modello di sponsorizzazione ci aiuta a mantenere il progetto e a introdurre in modo sostenibile nuove ed entusiasmanti funzionalità. Come sponsor hai accesso a tutte le implementazioni del caricabatterie.",
|
||||||
"descriptionToken": "In qualità di sponsor su GitGub, trovi il tuo token in {url}. Offriamo anche un token di prova per i test {trialToken}.",
|
"descriptionToken": "In qualità di sponsor su GitGub, trovi il tuo token in {url}. Offriamo anche un token di prova per i test {trialToken}.",
|
||||||
"email": "Email",
|
|
||||||
"emailHint": "Email usata per {url}",
|
|
||||||
"enterYourToken": "Il tuo token Sponsor",
|
"enterYourToken": "Il tuo token Sponsor",
|
||||||
"error": "Il token sponsor non è valido.",
|
"error": "Il token sponsor non è valido.",
|
||||||
"invalid": "non valido",
|
"invalid": "non valido",
|
||||||
|
|
|
||||||
|
|
@ -700,14 +700,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "ライセンスキー",
|
|
||||||
"activationKeyHint": "メールにて送付されます。{url} で確認することも可能です。",
|
|
||||||
"addToken": "トークンを入力",
|
"addToken": "トークンを入力",
|
||||||
"changeToken": "トークンを変更",
|
"changeToken": "トークンを変更",
|
||||||
"description": "スポンサーシップモデルは、プロジェクトの維持や、新しい魅力的な機能の継続的な開発に役立ちます。スポンサーになると、すべての充電器の統合機能にアクセスできるようになります。",
|
"description": "スポンサーシップモデルは、プロジェクトの維持や、新しい魅力的な機能の継続的な開発に役立ちます。スポンサーになると、すべての充電器の統合機能にアクセスできるようになります。",
|
||||||
"descriptionToken": "GitHubスポンサーの方は、{url} でトークンを確認できます。まず試してみたい方のために、{trialToken} もご用意しています。",
|
"descriptionToken": "GitHubスポンサーの方は、{url} でトークンを確認できます。まず試してみたい方のために、{trialToken} もご用意しています。",
|
||||||
"email": "メールアドレス",
|
|
||||||
"emailHint": "{url} で使用したメールアドレス",
|
|
||||||
"enterYourToken": "スポンサートークンを入力",
|
"enterYourToken": "スポンサートークンを入力",
|
||||||
"error": "スポンサートークンが無効です。",
|
"error": "スポンサートークンが無効です。",
|
||||||
"invalid": "無効",
|
"invalid": "無効",
|
||||||
|
|
|
||||||
|
|
@ -706,14 +706,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Lizenzschlëssel",
|
|
||||||
"activationKeyHint": "Per E-Mail un Iech geschéckt. Op der {url} ze fannen.",
|
|
||||||
"addToken": "Token aginn",
|
"addToken": "Token aginn",
|
||||||
"changeToken": "Token änneren",
|
"changeToken": "Token änneren",
|
||||||
"description": "De Sponsoring Modell hëlleft eis de Projet z'erhalen an nohalteg nei a spannend Fonctiounen z'entwéckelen. Als Sponsor kriss du Zougank zu all Wallbox-Implementatiounen.",
|
"description": "De Sponsoring Modell hëlleft eis de Projet z'erhalen an nohalteg nei a spannend Fonctiounen z'entwéckelen. Als Sponsor kriss du Zougank zu all Wallbox-Implementatiounen.",
|
||||||
"descriptionToken": "Als GitHub-Sponsor fannt Dir Ären Token op {url}. Mir bidden och ee Test-Token un fir ze testen {trialToken}.",
|
"descriptionToken": "Als GitHub-Sponsor fannt Dir Ären Token op {url}. Mir bidden och ee Test-Token un fir ze testen {trialToken}.",
|
||||||
"email": "E-Mail",
|
|
||||||
"emailHint": "E-Mail-Adress, déi Dir fir {url} benotzt hutt",
|
|
||||||
"enterYourToken": "Äre Sponsor-Token",
|
"enterYourToken": "Äre Sponsor-Token",
|
||||||
"error": "De Sponsortoken ass ongülteg.",
|
"error": "De Sponsortoken ass ongülteg.",
|
||||||
"invalid": "ongülteg",
|
"invalid": "ongülteg",
|
||||||
|
|
|
||||||
|
|
@ -783,14 +783,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Licencijos Raktas",
|
|
||||||
"activationKeyHint": "Išsiųstas jums el. paštu. Galima rasti adresu {url}.",
|
|
||||||
"addToken": "Įveskite žetoną",
|
"addToken": "Įveskite žetoną",
|
||||||
"changeToken": "Pakeisti žetoną",
|
"changeToken": "Pakeisti žetoną",
|
||||||
"description": "Rėmimo modelis padeda mums išlaikyti projektą ir tvariai kurti naujas, įdomias funkcijas. Kaip rėmėjas jūs galite valdyti įkroviklius, kurių naudojimui reikia rėmimo.",
|
"description": "Rėmimo modelis padeda mums išlaikyti projektą ir tvariai kurti naujas, įdomias funkcijas. Kaip rėmėjas jūs galite valdyti įkroviklius, kurių naudojimui reikia rėmimo.",
|
||||||
"descriptionToken": "GitHub rėmėjai gali matyti savo žetoną (token) {url}. Pradžiai - pasibandymui siūlome {trialToken}.",
|
"descriptionToken": "GitHub rėmėjai gali matyti savo žetoną (token) {url}. Pradžiai - pasibandymui siūlome {trialToken}.",
|
||||||
"email": "El. paštas",
|
|
||||||
"emailHint": "El. pašto adresas, kurį naudojote {url}",
|
|
||||||
"enterYourToken": "Jūsų rėmėjo žetonas",
|
"enterYourToken": "Jūsų rėmėjo žetonas",
|
||||||
"error": "Rėmėjo žetonas (token) negalioja.",
|
"error": "Rėmėjo žetonas (token) negalioja.",
|
||||||
"invalid": "negalioja",
|
"invalid": "negalioja",
|
||||||
|
|
|
||||||
|
|
@ -769,14 +769,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Licences atslēga",
|
|
||||||
"activationKeyHint": "Nostūtīts jums pa e-pastu. Atrodams {url}.",
|
|
||||||
"addToken": "Ievadiet marķieri",
|
"addToken": "Ievadiet marķieri",
|
||||||
"changeToken": "Mainīt marķieri",
|
"changeToken": "Mainīt marķieri",
|
||||||
"description": "Sponsorēšanas modelis palīdz mums uzturēt projektu un ilgtspējīgi veidot jaunas un aizraujošas funkcijas. Kā sponsors jūs iegūstat piekļuvi visām lādētāju implementācijām.",
|
"description": "Sponsorēšanas modelis palīdz mums uzturēt projektu un ilgtspējīgi veidot jaunas un aizraujošas funkcijas. Kā sponsors jūs iegūstat piekļuvi visām lādētāju implementācijām.",
|
||||||
"descriptionToken": "Kā GitHub Sponsors jūs atrodat savu marķieri {url}. Iesākumam piedāvājam {trialToken}.",
|
"descriptionToken": "Kā GitHub Sponsors jūs atrodat savu marķieri {url}. Iesākumam piedāvājam {trialToken}.",
|
||||||
"email": "E-pasts",
|
|
||||||
"emailHint": "E-pasta adrese ko izmantojāt {url}",
|
|
||||||
"enterYourToken": "Jūsu sponsora marķieris",
|
"enterYourToken": "Jūsu sponsora marķieris",
|
||||||
"error": "Sponsora marķieris nav derīgs.",
|
"error": "Sponsora marķieris nav derīgs.",
|
||||||
"invalid": "nederīgs",
|
"invalid": "nederīgs",
|
||||||
|
|
|
||||||
|
|
@ -763,14 +763,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Licentiesleutel",
|
|
||||||
"activationKeyHint": "Verzonden via email. Deze kan hier gevonden worden: {url}.",
|
|
||||||
"addToken": "Token invoeren",
|
"addToken": "Token invoeren",
|
||||||
"changeToken": "Token bewerken",
|
"changeToken": "Token bewerken",
|
||||||
"description": "Het sponsormodel helpt ons het project te onderhouden en nieuwe toffe functies te ontwikkelen. Als sponsor krijg je toegang tot de implementaties voor alle laadpunten.",
|
"description": "Het sponsormodel helpt ons het project te onderhouden en nieuwe toffe functies te ontwikkelen. Als sponsor krijg je toegang tot de implementaties voor alle laadpunten.",
|
||||||
"descriptionToken": "Als GitHub-sponsor vind je jouw token op {url}. Om aan de slag te kunnen, bieden we een {trialToken}.",
|
"descriptionToken": "Als GitHub-sponsor vind je jouw token op {url}. Om aan de slag te kunnen, bieden we een {trialToken}.",
|
||||||
"email": "E-mail",
|
|
||||||
"emailHint": "Email adres dat u gebruikte voor {url}",
|
|
||||||
"enterYourToken": "Jouw sponsortoken",
|
"enterYourToken": "Jouw sponsortoken",
|
||||||
"error": "De sponsortoken is ongeldig.",
|
"error": "De sponsortoken is ongeldig.",
|
||||||
"invalid": "ongeldig",
|
"invalid": "ongeldig",
|
||||||
|
|
|
||||||
|
|
@ -698,14 +698,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Chave de licença",
|
|
||||||
"activationKeyHint": "Enviado por e-mail. Pode ser consultado em {url}.",
|
|
||||||
"addToken": "Insira token",
|
"addToken": "Insira token",
|
||||||
"changeToken": "Alterar token",
|
"changeToken": "Alterar token",
|
||||||
"description": "O modelo de apoio (sponsoring) ajuda-nos a manter o projeto e a desenvolver, de forma sustentável, novas funcionalidades. Como apoiante (sponsor), terá acesso às integrações de todos os Carregadores.",
|
"description": "O modelo de apoio (sponsoring) ajuda-nos a manter o projeto e a desenvolver, de forma sustentável, novas funcionalidades. Como apoiante (sponsor), terá acesso às integrações de todos os Carregadores.",
|
||||||
"descriptionToken": "Como patrocinado do GitHub, pode encontrar o seu token em {url}. Para começar, disponibilizamos um {trialToken}.",
|
"descriptionToken": "Como patrocinado do GitHub, pode encontrar o seu token em {url}. Para começar, disponibilizamos um {trialToken}.",
|
||||||
"email": "E-mail",
|
|
||||||
"emailHint": "Endereço de e-mail que utilizou para {url}",
|
|
||||||
"enterYourToken": "O teu token de patrocinador",
|
"enterYourToken": "O teu token de patrocinador",
|
||||||
"error": "O token de Apoiante (Sponsor) não é válido.",
|
"error": "O token de Apoiante (Sponsor) não é válido.",
|
||||||
"invalid": "inválido",
|
"invalid": "inválido",
|
||||||
|
|
|
||||||
|
|
@ -772,14 +772,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Licenčný kľúč",
|
|
||||||
"activationKeyHint": "Odoslané e-mailom. Nájdete ho na adrese {url}.",
|
|
||||||
"addToken": "Zadajte token",
|
"addToken": "Zadajte token",
|
||||||
"changeToken": "Zmena tokenu",
|
"changeToken": "Zmena tokenu",
|
||||||
"description": "Model sponzorstva nám pomáha udržiavať projekt a trvalo vytvárať nové a zaujímavé funkcie. Ako sponzor získate prístup ku všetkým implementáciám nabíjačiek.",
|
"description": "Model sponzorstva nám pomáha udržiavať projekt a trvalo vytvárať nové a zaujímavé funkcie. Ako sponzor získate prístup ku všetkým implementáciám nabíjačiek.",
|
||||||
"descriptionToken": "Ako GitHub sponzor nájdete token na {url}. Pre začiatok ponúkame {trialToken}.",
|
"descriptionToken": "Ako GitHub sponzor nájdete token na {url}. Pre začiatok ponúkame {trialToken}.",
|
||||||
"email": "E-mail",
|
|
||||||
"emailHint": "E-mailová adresa, ktorú ste použili pre {url}",
|
|
||||||
"enterYourToken": "Váš sponzorský Token",
|
"enterYourToken": "Váš sponzorský Token",
|
||||||
"error": "Sponzorský token nie je platný.",
|
"error": "Sponzorský token nie je platný.",
|
||||||
"invalid": "neplatný",
|
"invalid": "neplatný",
|
||||||
|
|
|
||||||
|
|
@ -753,14 +753,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Licensnyckel",
|
|
||||||
"activationKeyHint": "Skickas med epost. Finns här {url}.",
|
|
||||||
"addToken": "Ange sponsor-token",
|
"addToken": "Ange sponsor-token",
|
||||||
"changeToken": "Ändra sponsor-token",
|
"changeToken": "Ändra sponsor-token",
|
||||||
"description": "Sponsormodellen hjälper oss att underhålla projektet och hållbart bygga nya och spännande funktioner. Som sponsor får du tillgång till alla laddningsmöjligheter.",
|
"description": "Sponsormodellen hjälper oss att underhålla projektet och hållbart bygga nya och spännande funktioner. Som sponsor får du tillgång till alla laddningsmöjligheter.",
|
||||||
"descriptionToken": "Som GitHub-sponsor hittar du din token på {url}. För att komma igång erbjuder vi en {trialToken}.",
|
"descriptionToken": "Som GitHub-sponsor hittar du din token på {url}. För att komma igång erbjuder vi en {trialToken}.",
|
||||||
"email": "Epost",
|
|
||||||
"emailHint": "Epost du använt för {url}",
|
|
||||||
"enterYourToken": "Din sponsor-token",
|
"enterYourToken": "Din sponsor-token",
|
||||||
"error": "Din sponsor-token är inte giltig.",
|
"error": "Din sponsor-token är inte giltig.",
|
||||||
"invalid": "ogiltig",
|
"invalid": "ogiltig",
|
||||||
|
|
|
||||||
|
|
@ -730,14 +730,10 @@
|
||||||
"title": "SMA Sunny Home Manager"
|
"title": "SMA Sunny Home Manager"
|
||||||
},
|
},
|
||||||
"sponsor": {
|
"sponsor": {
|
||||||
"activationKey": "Lisans Anahtarı",
|
|
||||||
"activationKeyHint": "Sana e-posta yoluyla gönderildi. {url} adresinde bulabilirsin.",
|
|
||||||
"addToken": "Jetonu gir",
|
"addToken": "Jetonu gir",
|
||||||
"changeToken": "Jetonu değiştir",
|
"changeToken": "Jetonu değiştir",
|
||||||
"description": "Destek modeli, projeyi sürdürmemize ve sürdürülebilir bir şekilde yeni ve heyecan verici özellikler geliştirmemize yardımcı oluyor. Destekçi olarak tüm doldurma cihazı uygulamalarına erişimin oluyor.",
|
"description": "Destek modeli, projeyi sürdürmemize ve sürdürülebilir bir şekilde yeni ve heyecan verici özellikler geliştirmemize yardımcı oluyor. Destekçi olarak tüm doldurma cihazı uygulamalarına erişimin oluyor.",
|
||||||
"descriptionToken": "GitHub Destekçisi olarak jetonunu {url} adresinde bulabilirsin. Deneyebilmen için sana bir {trialToken} veriyoruz.",
|
"descriptionToken": "GitHub Destekçisi olarak jetonunu {url} adresinde bulabilirsin. Deneyebilmen için sana bir {trialToken} veriyoruz.",
|
||||||
"email": "E-posta",
|
|
||||||
"emailHint": "{url} için kullandığın e-posta adresi",
|
|
||||||
"enterYourToken": "Destekçi Jetonun",
|
"enterYourToken": "Destekçi Jetonun",
|
||||||
"error": "Destekçi jetonu geçerli değil.",
|
"error": "Destekçi jetonu geçerli değil.",
|
||||||
"invalid": "geçersiz",
|
"invalid": "geçersiz",
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,7 @@ package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"regexp"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/evcc-io/evcc/api/globalconfig"
|
"github.com/evcc-io/evcc/api/globalconfig"
|
||||||
"github.com/evcc-io/evcc/core/keys"
|
"github.com/evcc-io/evcc/core/keys"
|
||||||
|
|
@ -13,8 +10,6 @@ import (
|
||||||
"github.com/evcc-io/evcc/util/sponsor"
|
"github.com/evcc-io/evcc/util/sponsor"
|
||||||
)
|
)
|
||||||
|
|
||||||
var licenseKeyPattern = regexp.MustCompile(`^[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}$`)
|
|
||||||
|
|
||||||
func setOptimizer(pub publisher) func(bool) error {
|
func setOptimizer(pub publisher) func(bool) error {
|
||||||
return func(b bool) error {
|
return func(b bool) error {
|
||||||
settings.SetBool(keys.Optimizer, b)
|
settings.SetBool(keys.Optimizer, b)
|
||||||
|
|
@ -45,7 +40,6 @@ func updateSponsortokenHandler(pub publisher) func(w http.ResponseWriter, r *htt
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
var req struct {
|
var req struct {
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
Email string `json:"email"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||||
|
|
@ -53,27 +47,7 @@ func updateSponsortokenHandler(pub publisher) func(w http.ResponseWriter, r *htt
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var token string
|
token := req.Token
|
||||||
|
|
||||||
// License key activation flow
|
|
||||||
if req.Email != "" {
|
|
||||||
// Validate token matches license key pattern
|
|
||||||
if !licenseKeyPattern.MatchString(strings.ToUpper(req.Token)) {
|
|
||||||
jsonError(w, http.StatusBadRequest, fmt.Errorf("invalid license key format"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Activate license key and receive JWT token
|
|
||||||
var err error
|
|
||||||
token, err = sponsor.ActivateSponsorship(req.Token, req.Email)
|
|
||||||
if err != nil {
|
|
||||||
jsonError(w, http.StatusBadRequest, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Use provided JWT token directly
|
|
||||||
token = req.Token
|
|
||||||
}
|
|
||||||
|
|
||||||
if token != "" {
|
if token != "" {
|
||||||
if err := sponsor.ConfigureSponsorship(token); err != nil {
|
if err := sponsor.ConfigureSponsorship(token); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
mu sync.RWMutex
|
mu sync.RWMutex
|
||||||
Subject, Token, ActivationKey string
|
Subject, Token string
|
||||||
ExpiresAt time.Time
|
ExpiresAt time.Time
|
||||||
)
|
)
|
||||||
|
|
||||||
func machineID() string {
|
func machineID() string {
|
||||||
|
|
@ -58,35 +58,6 @@ func IsAuthorizedForApi() bool {
|
||||||
return IsAuthorized() && Subject != unavailable && Token != ""
|
return IsAuthorized() && Subject != unavailable && Token != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// ActivateSponsorship activates a license key with email and returns the JWT token
|
|
||||||
func ActivateSponsorship(licenseKey, email string) (string, error) {
|
|
||||||
conn, err := cloud.Connection()
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("connection failed: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
client := pb.NewAuthClient(conn)
|
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
|
||||||
defer cancel()
|
|
||||||
|
|
||||||
res, err := client.Activate(ctx, &pb.ActivateRequest{
|
|
||||||
Key: licenseKey,
|
|
||||||
Email: email,
|
|
||||||
MachineId: machineID(),
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("activation failed: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if res.Error != "" {
|
|
||||||
return "", fmt.Errorf("%s", res.Error)
|
|
||||||
}
|
|
||||||
|
|
||||||
return res.Token, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// check and set sponsorship token
|
// check and set sponsorship token
|
||||||
func ConfigureSponsorship(token string) error {
|
func ConfigureSponsorship(token string) error {
|
||||||
mu.Lock()
|
mu.Lock()
|
||||||
|
|
@ -130,10 +101,9 @@ func ConfigureSponsorship(token string) error {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
res, err := client.IsAuthorized(ctx, &pb.AuthRequest{Token: token})
|
res, err := client.IsAuthorized(ctx, &pb.AuthRequest{Token: token, MachineId: machineID()})
|
||||||
if err == nil && res.Authorized {
|
if err == nil && res.Authorized {
|
||||||
Subject = res.Subject
|
Subject = res.Subject
|
||||||
ActivationKey = res.ActivationKey
|
|
||||||
ExpiresAt = res.ExpiresAt.AsTime()
|
ExpiresAt = res.ExpiresAt.AsTime()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -161,20 +131,11 @@ func redactToken(token string) string {
|
||||||
return token[:6] + "......." + token[len(token)-6:]
|
return token[:6] + "......." + token[len(token)-6:]
|
||||||
}
|
}
|
||||||
|
|
||||||
// redactKey returns a redacted version of the activation key showing only the first segment
|
|
||||||
func redactKey(key string) string {
|
|
||||||
if idx := strings.Index(key, "-"); idx > 0 {
|
|
||||||
return key[:idx] + "-XXXXX-XXXXX-XXXXX-XXXXX"
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type Status struct {
|
type Status struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
ExpiresAt time.Time `json:"expiresAt,omitempty"`
|
ExpiresAt time.Time `json:"expiresAt,omitempty"`
|
||||||
ExpiresSoon bool `json:"expiresSoon,omitempty"`
|
ExpiresSoon bool `json:"expiresSoon,omitempty"`
|
||||||
Token string `json:"token,omitempty"`
|
Token string `json:"token,omitempty"`
|
||||||
ActivationKey string `json:"activationKey,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RedactedStatus returns the sponsorship status
|
// RedactedStatus returns the sponsorship status
|
||||||
|
|
@ -188,10 +149,9 @@ func RedactedStatus() Status {
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status{
|
return Status{
|
||||||
Name: Subject,
|
Name: Subject,
|
||||||
ExpiresAt: ExpiresAt,
|
ExpiresAt: ExpiresAt,
|
||||||
ExpiresSoon: expiresSoon,
|
ExpiresSoon: expiresSoon,
|
||||||
Token: redactToken(Token),
|
Token: redactToken(Token),
|
||||||
ActivationKey: redactKey(ActivationKey),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue