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

Stop overridion requiresAuthentication #15

Open
Koc opened this issue Mar 30, 2012 · 0 comments
Open

Stop overridion requiresAuthentication #15

Koc opened this issue Mar 30, 2012 · 0 comments

Comments

@Koc
Copy link

Koc commented Mar 30, 2012

I propose remove overridion of requiresAuthentication method prior to $code parameter detection

<?php
# now
    protected function requiresAuthentication(Request $request)
    {
        if ( $this->httpUtils->checkRequestPath($request, $this->options['check_path'])
            || $this->httpUtils->checkRequestPath($request, $this->options['login_path'])
        ) {
            return true;
        }
        return false;
    }

    protected function attemptAuthentication(Request $request)
    {

        // redirect to auth provider
        if ($this->httpUtils->checkRequestPath($request, $this->options['login_path'])) {
            return $this->createProviderRedirectResponse($request);
        }

        $code = $request->get('code');
        // ...
    }

# I am propose to do
    protected function attemptAuthentication(Request $request)
    {
        $code = $request->get('code');

        // redirect to auth provider
        if (!$code) {
            return $this->createProviderRedirectResponse($request);
        }

        // ...
    }
Koc added a commit to Koc/EtcpasswdOAuthBundle that referenced this issue Mar 31, 2012
Koc added a commit to Koc/EtcpasswdOAuthBundle that referenced this issue Apr 28, 2012
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

1 participant