TYPO3 Flow identifies the communication partner as per request received for authentication. TYPO3 Flow provides an infrastructure of authentication to use different mechanisms and infrastructure is flexible extensibility. You can write your own authentication provider and easily configure with framework.
Authenticate User by authentication controller
There is a separate controller for authentication in TYPO3 Flow security package. There are two actions as authenticate Action() and logoutAction() in authentication controller. When you call http://localhost/flow/authenticate in browser that time TYPO3 Flow basic authentication process will in action. Authentication provider checks User by his username and password which is saved in the content repository.
Configuration in Settings.yaml file
Configuration of the default username/password authentication in Settings.yaml as below:
Above example we register 'PersistedUsernamePasswordProvide' authentication provider under 'DefaultProvider'. For authentic User we need to send username and password to the authentication controller.
Login form example
<form action="flow/authenticate" method="post" name="myLoginForm">
<input type="text" id="username" name="__authentication[TYPO3][Flow][Security][Authentication][Token][UsernamePassword][username]" />
<input type="password" id="password" name="__authentication[TYPO3][Flow][Security][Authentication][Token][UsernamePassword][password]" />
<input type="submit" value="Login" />
After successful submission of above login form, authentication process will be in action. If username and password is valid then User account will be authenticated.
TYPO3 Flow provide a view helper for authentication as 'IsAuthenticatedViewHelper'.
This view helper helps us to find out User is authenticate or not. You can easily use this view helper as below example.
This message will show when User is Authenticated.
This message will show if User is NOT Authenticated.