Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot make this working due to do not know how to configure it #72

Open
Bloodsucker opened this issue May 23, 2014 · 2 comments
Open

Comments

@Bloodsucker
Copy link

I am doing a web project with symfony2 that involves a CAS server: http://www.jasig.org/cas unfortunately I cannot make it working. I have tried several configurations and anything of what I do is correct. This is the flux that I am expecting to do for any user that wants to be logged:

  1. A user wants to login in my system
  2. My system redirects somehow the users to the cas server login web page to login with user credentials.
  3. After a valid login, cas server login webpage redirects user back to my system.
  4. My system knows if the user is well logged or not based on protocol mechanisms.

Following your instructions from the rep, here are all my configurations:

For the config.yml

be_simple_sso_auth:
    admin_sso:
        protocol:
            id: cas
            version: 2
        server:
            id: cas
            login_url: https://cas_server.fi/cas/login
            validation_url: https://cas_server.fi/cas/serviceValidate

For the security.yml

security:
    encoders:
        Symfony\Component\Security\Core\User\User: plaintext

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

    providers:
        in_memory:
            memory:
                users:
                    user:  { password: userpass, roles: [ 'ROLE_USER' ] }
                    admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
        my_firewall:
            pattern: ^/
            anonymous: ~
            trusted_sso:
                manager: admin_sso
                login_action: false
                create_users: true
                created_users_roles: [ROLE_ADMIN]
                check_path: /

The cas server provided me two .crt files that I have already installed in my Ubuntu 13.10. Or at least I what I think... however any of this previous configurations do not seem to want these certificates since I cannot specify where the bundle can find them. Anyway it does not work yet so this step maybe is irrelevant.

So, what happens now is the next:

  1. User access to / for first time
  2. My system redirect him to /login (as far as I understand it is the default direction...)

To manage this /login I have in routing.yml in my own bundle:

ss_web_login:
    path: /login
    defaults: { _controller: BeSimpleSsoAuthBundle:TrustedSso:login }

I have checked this controller and it looks like it draws an anchor to "somewhere" (I guess is the login form of my cas server.

Let's continue... as I said, the user is being redirected to /login but I get an error:

Controller "BeSimple\SsoAuthBundle\Controller\TrustedSsoController::loginAction()" requires that you provide a value for the "$manager" argument (because there is no default value or because there is a non optional argument after this one).

It happens because the BeSimpleSsoAuthBundle:TrustedSso:login expects different parameters:

public function loginAction(Manager $manager, Request $request, AuthenticationException $exception = null)

But nobody is passing these parameters that it expects. What should I do?

Please, if you have ANY other suggestion about make this working I will really appreciate.

Thank you so much.

@adek
Copy link

adek commented Oct 4, 2014

Do you find solution for your problem? I'm having the same error and I can't figure it out what's wrong.

Controller "BeSimple\SsoAuthBundle\Controller\TrustedSsoController::loginAction()" requires that you provide a value for the "$manager" argument (because there is no default value or because there is a non optional argument after this one).

@rahulgpai
Copy link

Kindly check the answer for the above issue on the below link

http://stackoverflow.com/a/35790709/4898826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants