- Home
- Coding concepts
- Special screens
- Available features
- More
- Translation
- Testing
- Deployment
- Differences in Locify 0.8.5
- Sample services
- Example videos
Authentication
Locify client has support for authentication of your users. When you set HTTP status to 401, screen with login and password will be shown. After user fills it, "login" and "password" are sent via POST to the same URL. If you want credentials to be sent to different URL, you can specify it in header. User can also save login information and will not have to input them again.
If username and password does not match, it's a good idea to send back alert with some error message. In case user is logged in, use redirection with some sessionID set in cookies. Alerts can also be used for redirection.
Format
Just set HTTP Response to:
401 Unauthorized
If you want to change the URL credentials are sent to (by default same URL is used) set this HTTP header:
X-Authentication-Url : http://www.mycoolservice.com/processLogin
How it looks like

