Authentication¶
Logging in as a Frontend-User with the TYPO3 RestApi¶
The EXT:nnrestapi
ships with an endpoint for logging in as a frontend-user (fe_user
) and for checking the login-status
of the current user.
nnrestapi offers three different options for authenticating:
Authorization via JSON Web Tokens (JWT)
Cookie-based Authorization. This uses the same
fe_typo_user
cookie that is set for "normal" Frontend-Users.
Links and recipes¶
To learn how to authenticate, dive in to one of the following recipes:
Link to documentation |
Content |
---|---|
Make sure, not anybody can access certain endpoints. Restrict access to certain frontend-users or -groups. |
|
How to set username and password for individual users and as a global api-key for multiple users. The authentication will work using the HTTP Basic Authentication. |
|
Example fe_user-auth using nothing but pure JavaScript ("VanillaJS"). Requires a modern browser that support ES6+ (anything but Internet Explorer 11 and below) |
|
Example fe_user-auth using nothing but pure JavaScript ("VanillaJS").
Same like above, but for older browsers that can't use |
|
Pure JavaScript solution, but with a little help from the great JS library "axios" that makes life a little easier. |
|
If you still like jQuery, although the world is moving somewhere else, here is an example for the authentication using jQuery. |