1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-29 13:49:28 +08:00
Mainflux.mainflux/pkg/sdk/go/requests.go
Ian Ngethe Muchiri c8710efce0
NOISSUE-Add resetPassword to the SDK (#1872)
* Add resetPassword to the SDK

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add space to sdk comments

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add tab space to comments

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update .env file

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add referer header to sdk request

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update .env file

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update adding headers to processRequest

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* remove code repetition

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add comment to content-Type

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update header initialization

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update docker-compose file

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add cli functionality

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add host as a tag

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update hostURL flag

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update comments

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* remove hostURL duplication

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update inline

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add space in comments

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add space in comment

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update description of reset password request

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

---------

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2023-08-01 17:03:18 +02:00

51 lines
1.3 KiB
Go

// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0
package sdk
// updateClientSecretReq is used to update the client secret.
type updateClientSecretReq struct {
OldSecret string `json:"old_secret,omitempty"`
NewSecret string `json:"new_secret,omitempty"`
}
type resetPasswordRequestreq struct {
Email string `json:"email"`
Host string `json:"host"`
}
type resetPasswordReq struct {
Token string `json:"token"`
Password string `json:"password"`
ConfPass string `json:"confirm_password"`
}
type updateThingSecretReq struct {
Secret string `json:"secret,omitempty"`
}
// updateClientIdentityReq is used to update the client identity.
type updateClientIdentityReq struct {
token string
id string
Identity string `json:"identity,omitempty"`
}
// UserPasswordReq contains old and new passwords.
type UserPasswordReq struct {
OldPassword string `json:"old_password,omitempty"`
Password string `json:"password,omitempty"`
}
// ConnectionIDs contains ID lists of things and channels to be connected.
type ConnectionIDs struct {
ThingIDs []string `json:"subjects"`
ChannelIDs []string `json:"objects"`
Actions []string `json:"actions,omitempty"`
}
type tokenReq struct {
Identity string `json:"identity"`
Secret string `json:"secret"`
}