Management of CRUD methods with gorm and go-swagger.

I have an application that uses Gorm Y go-swagger for a simple API. One of the route handlers was swollen in 66 lines and it was quite simple when performing the basic sanitary controls:

// CreateJWToken will create a JWToken based on credentials
func (u * Users) CreateJWToken (params users.CreateJWTokenParams) middleware.Responder {
if params.Body == nil || params.Body.Email == nil || params.Body.Password == nil {
message: = "Invalid email or password"
returns users.NewCreateJWTokenUnauthorized (). WithPayload (& models.Error {Message: & message})
}

user types var. user
err: = u.DB.First (& user, "email =?", params.Body.Email) .Error
yes err! = nil {
message: = "Error creating the token"
returns users.NewCreateJWTokenDefault (500) .WithPayload (& models.Error {Message: & message})
}

if user.ID == 0 {
message: = "User not found"
returns users.NewCreateJWTokenUnauthorized (). WithPayload (& models.Error {Message: & message})
}

yes! u.checkPasswordHash (* params.Body.Password, * user.Password) {
message: = "Not authorized"
returns users.NewCreateJWTokenUnauthorized (). WithPayload (& models.Error {Message: & message})
}

// Generate JWToken
token: = jwt.NewWithClaims (jwt.SigningMethodHS256, jwt.MapClaims {
"user_id": user.ID,
"nbf": time.Date (2018, 11, 21, 12, 0, 0, 0, time.UTC) .Unix (),
})

// Decipher the secret HMAC
hmacSecret, err: = hex.DecodeString (u.Config.JWTHmacSecret)
yes err! = nil {
message: = "Error decrypting the HMAC secret"
log.Fatal (message, err.Error ())
returns users.NewCreateJWTokenDefault (500) .WithPayload (& models.Error {Message: & message})
}

// Sign and get the complete coded token as a string using the secret
tokenString, err: = token.SignedString (hmacSecret)
yes err! = nil {
message: = "Error signing the token"
returns users.NewCreateJWTokenUnauthorized (). WithPayload (& models.Error {Message: & message})
}

// Store the JWToken in the database
var dbToken tipo.JWToken
dbToken.User = user
// Hash the token, we do not want to store it in plain text
hash: = utils.HashFromString (& tokenString)
dbToken.Token = & hash

// Save in the database
err = u.DB.Create (& dbToken) .Error
yes err! = nil {
message: = "Error creating the token"
returns users.NewCreateJWTokenDefault (500) .WithPayload (& models.Error {Message: & message})
}

// Build the answer
payload: = models.JWToken {
Token: & tokenString,
}

return users.NewCreateJWTokenCreated (). WithPayload (& payload)
}

Most of the code is validity controls and there does not seem to be much to refactor in generalized functions. Is this length okay? How could this be structured better?