Move AuthenticateUserRequest and AuthenticateUserResponse to types.go

This commit is contained in:
Juan Carlos Mejías Rodríguez 2019-07-23 18:17:25 -04:00
parent 5664faf2dd
commit 5d723af9fd
2 changed files with 9 additions and 9 deletions

View File

@ -66,15 +66,6 @@ func GetNewAuthenticationToken() (string, error) {
return respBody.Jwt, nil
}
type AuthenticateUserRequest struct {
Username string
Password string
}
type AuthenticateUserResponse struct {
Jwt string
}
func AddAuthorizationHeader(request *http.Request) error {
token, err := GetAuthenticationToken()
if err != nil {

View File

@ -72,3 +72,12 @@ type GenericError struct {
func (e *GenericError) Error() string {
return fmt.Sprintf("%s: %s", e.Err, e.Details)
}
type AuthenticateUserRequest struct {
Username string
Password string
}
type AuthenticateUserResponse struct {
Jwt string
}