func (h *jwtAuthorizationHandler) deny(job rest.Job, statusCode int, msg string) (bool, error) {
	h.logger(job, msg)
	switch {
	case job.AcceptsContentType(rest.ContentTypeJSON):
		return rest.NegativeFeedback(job.JSON(false), statusCode, msg)
	case job.AcceptsContentType(rest.ContentTypeXML):
		return rest.NegativeFeedback(job.XML(), statusCode, msg)
	default:
		job.ResponseWriter().WriteHeader(statusCode)
		job.ResponseWriter().Header().Set("Content-Type", rest.ContentTypePlain)
		job.ResponseWriter().Write([]byte(msg))
		return false, nil
	}
}
// deny sends a negative feedback to the caller.
deny sends a negative feedback to the caller.
// deny sends a negative feedback to the caller .
func (h *jwtAuthorizationHandler) deny(job rest.Job, statusCode int, msg string) (bool, error) {
	h.logger(job, msg)
	switch {
	case job.AcceptsContentType(rest.ContentTypeJSON):
		return rest.NegativeFeedback(job.JSON(false), statusCode, msg)
	case job.AcceptsContentType(rest.ContentTypeXML):
		return rest.NegativeFeedback(job.XML(), statusCode, msg)
	default:
		job.ResponseWriter().WriteHeader(statusCode)
		job.ResponseWriter().Header().Set("Content-Type", rest.ContentTypePlain)
		job.ResponseWriter().Write([]byte(msg))
		return false, nil
	}
}
func ( h * jwtAuthorizationHandler ) deny ( job rest . Job , statusCode int , msg string ) ( bool , error ) { h . logger ( job , msg ) switch { case job . AcceptsContentType ( rest . ContentTypeJSON ) : return rest . NegativeFeedback ( job . JSON ( false ) , statusCode , msg ) case job . AcceptsContentType ( rest . ContentTypeXML ) : return rest . NegativeFeedback ( job . XML ( ) , statusCode , msg ) default : job . ResponseWriter ( ) . WriteHeader ( statusCode ) job . ResponseWriter ( ) . Header ( ) . Set ( " " , rest . ContentTypePlain ) job . ResponseWriter ( ) . Write ( [ ] byte ( msg ) ) return false , nil } }
deny sends a negative feedback to the caller.
deny sends a negative feedback to the caller .