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

renewAuthentication doesn't force renew if user already authenticated #438

Open
bzbzh opened this issue Feb 22, 2024 · 0 comments
Open

renewAuthentication doesn't force renew if user already authenticated #438

bzbzh opened this issue Feb 22, 2024 · 0 comments

Comments

@bzbzh
Copy link

bzbzh commented Feb 22, 2024

Hi,

This issue is quite related with this previous one: #93.

In this issue, this fixed has been made: 96a32a1#diff-fda8f069ddbab09f78110718008adf9bb2e330db9b2a2423c17a9bb4786e2990R1226

In my opinion the removal of $this->redirectToCas(false, true); is a mistake here (or the none use of $renew parameter in isAuthenticated, see below).

Because when you arrive to isAuthenticated first lines are:

    if ( $this->_wasPreviouslyAuthenticated() ) {
            if ($this->hasTicket()) {
                // User has a additional ticket but was already authenticated
                phpCAS::trace(
                    'ticket was present and will be discarded, use renewAuthenticate()'
                );

Which is a bit ironical (besides the fact it should read "use renewAuthentication()") since we are coming from it.
In the beginning of this function, if the user was previously authenticated (either he has a ticket or no), the function will return true, and won't be using the $renew parameter.
So renew is not renewing if user is already authenticated, unless I am mistaken.

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