* Initial commit
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* change active to string
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* Set default
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* Fix query all users
Signed-off-by: GitHub <noreply@github.com>
* Set user active on service
Signed-off-by: GitHub <noreply@github.com>
* Rename active to state
Signed-off-by: GitHub <noreply@github.com>
* check user active on service
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* format
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* format
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* fix test
Signed-off-by: GitHub <noreply@github.com>
* Add deactivate user tests
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* Rename deactivate to change user status
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* Revert to sorting users
Signed-off-by: GitHub <noreply@github.com>
* change user state
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* Change user status to enable and disable
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* change user state to status
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* from enable to activate
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* from activate to enable
Signed-off-by: GitHub <noreply@github.com>
* not found error by retrievebyID
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* Combine enable and disable user
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* Add api docs
Signed-off-by: b1ackd0t <blackd0t@protonmail.com>
* verify docs
Signed-off-by: b1ackd0t <blackd0t@protonmail.com>
* change to camel
Signed-off-by: b1ackd0t <blackd0t@protonmail.com>
* Reword
Signed-off-by: b1ackd0t <blackd0t@protonmail.com>
* fix default state
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* change from VARCHAR to ENUM
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* invalid user status test
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: b1ackd0t <blackd0t@protonmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add max and min limit size
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* Format
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
* Format
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* MF-1348 - Add go-kit transport level logging
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix merge
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remark
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix go test flags
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in things and http service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix SDK tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in certs and provision service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in consumers service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* General renaming and add ErrMissingToken
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename httputil -> apiutil and use errors in users servive
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use apiutil errors in auth, bootstrap, readers, things and twins
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Replace errors.Contain by comparison
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateID
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateID
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify and rename ExtractAuthToken -> ExtractBearerToken
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix readers
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix auth key test and remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Improve comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateUUID check
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* MF-1469 - Indicate proper authentication scheme in Authorization header
Signed-off-by: Stefan Kovacevic <jen2tri@gmail.com>
* Fixing the remarks on the last push
Signed-off-by: Stefan Kovacevic <jen2tri@gmail.com>
* Remove Bearer prefix in all services and fix tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Co-authored-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* MF-1240 - Return to service transport layer only service errors
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Remove unecessary errors
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm duplicated errors and fix transport
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert http endpoint_test
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix conflict
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use gomail package for sending emails
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* remove print err
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* Add vendor
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* Rename email structure
remove logger
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* typo in var name
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* rename var
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* remove MF_EMAIL_SECRET
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* MF-1368 - Add internal http api package for query params reading
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comments
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comments
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use internal/http and internalhttp alias
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv errors types to pkg
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil/query.go and remove aliases
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add blank lines after error definitions
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add ReadBoolValueQuery
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv readBoolValueQuery
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* User ErrNotFoundParam instead of pointer
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert ReadUintQuery to use default values
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use default values for all query readers
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Init commit - implement errors package on things service
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* things service errors issue
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Decode errors
Add authn service to run script
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Modify tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* service_test
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* debug lines
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Regulate tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Improve errors in Redis
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Remove dead code
Inline if conditions
Rename err var
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Transform errors messages to lowercase
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* improve errors package
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* modify wrap method
inline wrapping errors in redis
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add copyright to errors package
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* wrapping nil error returns wrapper (instead of nil)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* move response messages in test to vars
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* golangcibot review fix
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* golangbot fix review in transport
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* user service - wraping errors
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* wrapping more errors
unwrap only wrapped errors
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add internal database error
Wrap internal database error
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Wrap user not found error
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Wrapping errors in idp and hasher
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Use error.Is for testing errors in Identify test
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Get wraper from wrapped errors
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Switch order of wrapping errors
Remove dead code (comments)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* assert true in tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Change comparing errors in tests (assert.True)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add errorRes structure to API responses in body in things service
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* resolve conflicts after rebasing
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Create errors package
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* implement new errors package
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Modify tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* return copyright comments
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove changes from .gitignore
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Move logging to encode errors
Comment exported vars and methods
Formatting
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Login function returns errors.Error
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Modify login tests to meet login returning errors.Error
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Error interface
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Change parameter in Wrapper to interface Error
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* implement new error interface
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Modify tests to use new Error interface
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix Login
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Remove unnecessary errir casting
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* new error interface implementation
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* check if Error is empty in registrationEndpoint
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add Empty factory function
Use new Empty factory function
Use isEmpty method
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Lose else in encodeError
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Modify tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Remove *json.UnmarshalTypeError and *json.SyntaxError types from encodeError type switch
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix nil error value in jwtIdentityProvider
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix gprc to use new error package
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* rename receiver in errors package
grpc errors
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove debugging code
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Resolving conflicts after rebase
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Remove comment
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Remove Empty from custom error
Implement custom error on new methods
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* WIP tests
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove wrap from Error interface
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* password-change related tests
remove debug code
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove dead code
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Move all errors casting to errors package
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix comment in error package
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Change struct pointer to interface in package methods
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* resolving reviews
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* fix return in database.go
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix copyright header
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Fix comment in hasher
Signed-off-by: Ivan Milošević <iva@blokovi.com>