def authenticate_devise_resource!
        if params[:devise_type].present?
          authenticate_method_name = "authenticate_#{params[:devise_type].to_resource_name}!"
          if respond_to?(authenticate_method_name)
            send(authenticate_method_name)
          else
            render plain: "403 Forbidden: Unauthenticated", status: 403
          end
        else
          render plain: "400 Bad Request: Missing parameter", status: 400
        end
      end
def authenticate_devise_resource!
        if params[:devise_type].present?
          authenticate_method_name = "authenticate_#{params[:devise_type].to_resource_name}!"
          if respond_to?(authenticate_method_name)
            send(authenticate_method_name)
          else
            render plain: "403 Forbidden: Unauthenticated", status: 403
          end
        else
          render plain: "400 Bad Request: Missing parameter", status: 400
        end
      end
Authenticate devise resource by Devise (e.g. calling authenticate_user! method).
 @api protected
 @todo Needs to call authenticate method by more secure way
 @return [Responce] Redirects for unsigned in target by Devise, returns HTTP 403 without neccesary target method or returns 400 when request parameters are not enough