The HTTP authentication
Authentication logic covers the matching between user credentials (usually, a username and password combination) and an existing user defined in your system.
CakePHP is packed with several authentication classes, which provide you with the most widely used types for use in your application:
FormAuthenticate
: This is used to provide a login page and submit user credentials via aPOST
request to your login action.BasicAuthenticate
: This lets the browser ask you for the credentials, using a standard HTTP basic authentication. The credentials are sent in plain text to the web server. This could be a security risk in your application, so using SSL is strongly advised.DigestAuthenticate
: This uses the HTTP digest authentication method. It is slightly more secure than the basic HTTP authentication, as the credentials are hashed before sending them to the server. However, security risk still exists, so using SSL is suggested.
In this recipe, we'll explore the basic HTTP...