src.dualinventive.com/go/authentication-service
Jerry Jacobs 1193c82181 initial 2024-08-09 12:10:16 +02:00
..
cmd initial 2024-08-09 12:10:16 +02:00
config initial 2024-08-09 12:10:16 +02:00
etc initial 2024-08-09 12:10:16 +02:00
grpc initial 2024-08-09 12:10:16 +02:00
internal initial 2024-08-09 12:10:16 +02:00
rest initial 2024-08-09 12:10:16 +02:00
vendor initial 2024-08-09 12:10:16 +02:00
CHANGELOG.md initial 2024-08-09 12:10:16 +02:00
Gopkg.lock initial 2024-08-09 12:10:16 +02:00
Gopkg.toml initial 2024-08-09 12:10:16 +02:00
Makefile initial 2024-08-09 12:10:16 +02:00
README.md initial 2024-08-09 12:10:16 +02:00
package.yml initial 2024-08-09 12:10:16 +02:00

README.md

Authentication Service

This service allows for creating, removing and otherwise managing authorization tokens.
This service can be consumed using grpc or rest.

  • /etc - contains example configuration files
  • /grpc - contains proto defintions
  • /rest - contains a swagger file

Run this application with the --config flag to point to the appropriate configuration file.

Operation error responses

Function Error REST gRPC
DeleteToken authtokens.ErrInvalidToken NewDeleteTokenBadRequest (400) Unauthorized (401) InvalidArgument Unauthenticated
DeleteToken authtokens.ErrNilToken NewDeleteTokenBadRequest (400) Unauthorized (401) InvalidArgument Unauthenticated
DeleteToken authtokens.ErrTokenNotFound NewDeleteTokenBadRequest (400) Unauthorized (401) InvalidArgument Unauthenticated
DeleteToken otherwise NewDeleteTokenInternalServerError (500) Internal
ListTokens authtokens.ErrInvalidToken NewListTokensBadRequest (400) Unauthorized (401) Internal Unauthenticated
ListTokens authtokens.ErrNilToken NewListTokensBadRequest (400) Unauthorized (401) Internal Unauthenticated
ListTokens otherwise NewListTokensBadRequest (400) InternalServerError Internal
Login authtokens.ErrInvalidCredentials NewPostLoginUnauthorized (401) InvalidArgument Unauthenticated
Login otherwise NewPostLoginInternalServerError (500) Internal
Logout authtokens.ErrNilToken NewLogoutNotFound (404) Unauthorized (401) Unauthenticated
Logout authtokens.ErrTokenNotFound NewLogoutNotFound (404) Unauthorized (401) NotFound Unauthenticated
Logout otherwise NewLogoutInternalServerError (500) Internal
Me authtokens.ErrTokenNotFound NewGetMeNotFound (404) Unauthorized (401) Unauthenticated
Me authtokens.ErrUserNotFound NewGetMeNotFound (404) Unauthorized (401) Unauthenticated
Me otherwise NewGetMeInternalServerError (500) Internal
VerifyToken otherwise NewVerifyInternalServerError (500) Internal
RequestPasswordReset pwreset.ErrFailedToCreateResetCode NewPostPasswordResetRequestInternalServerError (500) Internal
RequestPasswordReset pwreset.ErrFailedToSendEmail NewPostPasswordResetRequestInternalServerError (500) Internal
RequestPasswordReset pwreset.ErrUserFetchFailed NewPostPasswordResetRequestInternalServerError (500) Internal
RequestPasswordReset otherwise NewPostPasswordResetRequestBadRequest (400) InvalidArgument
RedeemPasswordReset pwreset.ErrChangePasswordFailed NewPostPasswordResetRedeemInternalServerError (500) Internal
RedeemPasswordReset pwreset.ErrFailedToGetResetCode NewPostPasswordResetRedeemInternalServerError (500) Internal
RedeemPasswordReset otherwise NewPostPasswordResetRedeemBadRequest (400) InvalidArgument