Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7959645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:36:23+00:00 2026-06-04T04:36:23+00:00

I have a Symfony application that provides a REST interface. When a client requests

  • 0

I have a Symfony application that provides a REST interface. When a client requests a URL, the resource validates the username/password in the URL and then provides access. However the controller, that validates the URL, is in another bundle and is called validateCredentialsAction.

How do I call this validateCredentialsAction from another controller in another bundle?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:36:24+00:00Added an answer on June 4, 2026 at 4:36 am

    You could define your authentication controller as a service according to http://symfony.com/doc/master/cookbook/controller/service.html, then inject it into the other controller.

    However this could get problematic because a controller action should return a Response object and not a boolean indicating wether the authentication was successful.

    So it would be better to refactore your code and extract the authentication part into a buisiness service that provides only authentication and no controller capabilities and then inject this service into both controllers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that I'm converting to Symfony/Doctrine. It currently stores a serialized
I have a Symfony app that populates the widgets of a portal application and
I am writing an application using Symfony. I have some reusable components that I
I have the following routes configuration in a Symfony application: label: url: /label param:
I have a symfony 1.4 application called client with a module device . Here
I have an application I wrote in PHP (on symfony) that imports large CSV
I have a Symfony application that uses Doctrine as its ORM. Based on Symfony's
I'm constructing an ecommerce application in Symfony, and I have a page which lists
I have a Symfony task that generates some files calls exec to a jar
We have FireSymfony that allows one to view the Symfony, PHP variables in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.