mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-23 15:51:24 +00:00
change some comments
This commit is contained in:
@@ -257,7 +257,7 @@ func (s *User) VerifyEmail(ctx context.Context, req *pb.VerifyEmailRequest, rsp
|
|||||||
return errors.BadRequest("user.verifyemail", "missing email")
|
return errors.BadRequest("user.verifyemail", "missing email")
|
||||||
}
|
}
|
||||||
if len(req.Token) == 0 {
|
if len(req.Token) == 0 {
|
||||||
return errors.BadRequest("user.verifyemail", "missing token")
|
return errors.BadRequest("user.verifytoken", "missing token")
|
||||||
}
|
}
|
||||||
|
|
||||||
// check the token exists
|
// check the token exists
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.27.1
|
// protoc-gen-go v1.27.1
|
||||||
// protoc v3.19.1
|
// protoc v3.15.6
|
||||||
// source: proto/user.proto
|
// source: proto/user.proto
|
||||||
|
|
||||||
package user
|
package user
|
||||||
@@ -1073,10 +1073,12 @@ type VerifyEmailRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// the unique id assigned to the verification process
|
||||||
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
// the email address to verify
|
// the email address to verify
|
||||||
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
|
||||||
// The token from the verification email
|
// The token from the verification email
|
||||||
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *VerifyEmailRequest) Reset() {
|
func (x *VerifyEmailRequest) Reset() {
|
||||||
@@ -1111,6 +1113,13 @@ func (*VerifyEmailRequest) Descriptor() ([]byte, []int) {
|
|||||||
return file_proto_user_proto_rawDescGZIP(), []int{18}
|
return file_proto_user_proto_rawDescGZIP(), []int{18}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *VerifyEmailRequest) GetId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
func (x *VerifyEmailRequest) GetEmail() string {
|
func (x *VerifyEmailRequest) GetEmail() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Email
|
return x.Email
|
||||||
@@ -1163,6 +1172,13 @@ func (*VerifyEmailResponse) Descriptor() ([]byte, []int) {
|
|||||||
return file_proto_user_proto_rawDescGZIP(), []int{19}
|
return file_proto_user_proto_rawDescGZIP(), []int{19}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send a verification email to a user.
|
||||||
|
// Email "from" will be 'noreply@email.m3ocontent.com'.
|
||||||
|
// The verification link will be injected in the email
|
||||||
|
// as a template variable, $micro_verification_link e.g
|
||||||
|
// 'Welcome to M3O! Use the link below to verify your email: $micro_verification_link'
|
||||||
|
// The variable will be replaced with a url similar to:
|
||||||
|
// 'https://user.m3o.com/user/verify?token=a-verification-token&redirectUrl=your-redir-url'
|
||||||
type SendVerificationEmailRequest struct {
|
type SendVerificationEmailRequest struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@@ -1175,7 +1191,9 @@ type SendVerificationEmailRequest struct {
|
|||||||
// Text content of the email. Don't forget to include the string '$micro_verification_link' which will be replaced by the real verification link
|
// Text content of the email. Don't forget to include the string '$micro_verification_link' which will be replaced by the real verification link
|
||||||
// HTML emails are not available currently.
|
// HTML emails are not available currently.
|
||||||
TextContent string `protobuf:"bytes,3,opt,name=textContent,proto3" json:"textContent,omitempty"`
|
TextContent string `protobuf:"bytes,3,opt,name=textContent,proto3" json:"textContent,omitempty"`
|
||||||
|
// The url to redirect to after successful verification
|
||||||
RedirectUrl string `protobuf:"bytes,4,opt,name=redirectUrl,proto3" json:"redirectUrl,omitempty"`
|
RedirectUrl string `protobuf:"bytes,4,opt,name=redirectUrl,proto3" json:"redirectUrl,omitempty"`
|
||||||
|
// The url to redirect to incase of failure
|
||||||
FailureRedirectUrl string `protobuf:"bytes,5,opt,name=failureRedirectUrl,proto3" json:"failureRedirectUrl,omitempty"`
|
FailureRedirectUrl string `protobuf:"bytes,5,opt,name=failureRedirectUrl,proto3" json:"failureRedirectUrl,omitempty"`
|
||||||
// Display name of the sender for the email. Note: the email address will still be 'noreply@email.m3ocontent.com'
|
// Display name of the sender for the email. Note: the email address will still be 'noreply@email.m3ocontent.com'
|
||||||
FromName string `protobuf:"bytes,6,opt,name=fromName,proto3" json:"fromName,omitempty"`
|
FromName string `protobuf:"bytes,6,opt,name=fromName,proto3" json:"fromName,omitempty"`
|
||||||
@@ -1983,10 +2001,11 @@ var file_proto_user_proto_rawDesc = []byte{
|
|||||||
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01,
|
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22,
|
||||||
0x10, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x10, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
0x65, 0x22, 0x40, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c,
|
0x65, 0x22, 0x50, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a,
|
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
||||||
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a,
|
||||||
|
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
|
||||||
0x6b, 0x65, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61,
|
0x6b, 0x65, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61,
|
||||||
0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xde, 0x01, 0x0a, 0x1c, 0x53,
|
0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xde, 0x01, 0x0a, 0x1c, 0x53,
|
||||||
0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
|
0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
|
||||||
|
|||||||
@@ -163,24 +163,25 @@ message LogoutResponse {
|
|||||||
|
|
||||||
// Verify the email address of an account from a token sent in an email to the user.
|
// Verify the email address of an account from a token sent in an email to the user.
|
||||||
message VerifyEmailRequest {
|
message VerifyEmailRequest {
|
||||||
|
// the unique id assigned to the verification process
|
||||||
|
string id = 1;
|
||||||
// the email address to verify
|
// the email address to verify
|
||||||
string email = 1;
|
string email = 2;
|
||||||
// The token from the verification email
|
// The token from the verification email
|
||||||
string token = 2;
|
string token = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message VerifyEmailResponse{
|
message VerifyEmailResponse{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send a verification email
|
// Send a verification email to a user.
|
||||||
// to the user being signed up. Email from will be from 'noreply@email.m3ocontent.com',
|
// Email "from" will be 'noreply@email.m3ocontent.com'.
|
||||||
// but you can provide the title and contents.
|
// The verification link will be injected in the email
|
||||||
// The verification link will be injected in to the email as a template variable, $micro_verification_link.
|
// as a template variable, $micro_verification_link e.g
|
||||||
// Example: 'Hi there, welcome onboard! Use the link below to verify your email: $micro_verification_link'
|
// 'Welcome to M3O! Use the link below to verify your email: $micro_verification_link'
|
||||||
// The variable will be replaced with an actual url that will look similar to this:
|
// The variable will be replaced with a url similar to:
|
||||||
// 'https://user.m3o.com/user/verify?token=a-verification-token&redirectUrl=your-redir-url'
|
// 'https://user.m3o.com/user/verify?token=a-verification-token&redirectUrl=your-redir-url'
|
||||||
|
|
||||||
message SendVerificationEmailRequest{
|
message SendVerificationEmailRequest{
|
||||||
// email address to send the verification code
|
// email address to send the verification code
|
||||||
string email = 1;
|
string email = 1;
|
||||||
@@ -189,7 +190,9 @@ message SendVerificationEmailRequest{
|
|||||||
// Text content of the email. Don't forget to include the string '$micro_verification_link' which will be replaced by the real verification link
|
// Text content of the email. Don't forget to include the string '$micro_verification_link' which will be replaced by the real verification link
|
||||||
// HTML emails are not available currently.
|
// HTML emails are not available currently.
|
||||||
string textContent = 3;
|
string textContent = 3;
|
||||||
|
// The url to redirect to after successful verification
|
||||||
string redirectUrl = 4;
|
string redirectUrl = 4;
|
||||||
|
// The url to redirect to incase of failure
|
||||||
string failureRedirectUrl = 5;
|
string failureRedirectUrl = 5;
|
||||||
// Display name of the sender for the email. Note: the email address will still be 'noreply@email.m3ocontent.com'
|
// Display name of the sender for the email. Note: the email address will still be 'noreply@email.m3ocontent.com'
|
||||||
string fromName = 6;
|
string fromName = 6;
|
||||||
|
|||||||
Reference in New Issue
Block a user