phpCAS html form authentication for username and password

305 views Asked by At

I'm trying to authenticate a username and password with a CAS server using phpCAS but didn't find anything relevant on the internet. Once the user inputs their username and password how do I authenticate it with a CAS server using phpCAS? Also, how do I redirect user to a different .php page? I saw that we can use phpCAS:foreAuthentication() to authenticate users, but I'm trying to understand how a user is authenticated using this. Thanks!

1

There are 1 answers

0
Misagh Moayyed On

Once the user inputs their username and password how do I authenticate it with a CAS server using phpCAS?

You do not. The CAS server authenticates the credentials, not the phpCAS library.

Also, how do I redirect user to a different .php page?

Redirects are controlled by the initial service parameter that CAS would use, after issuing a ticket. Once you are at that location, you can redirect to anywhere you like.

I'm trying to understand how a user is authenticated using this.

The authentication strategies are defined inside the CAS server, which takes the credentials provided and verify them against relevant account sources. You, as the client, do not need to bother with how that happens; just that it happens and that you are provided a ticket and that you need to validate it; a task that the CAS client library does for you.