All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.demos.formAuth.html Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
{% extends "../demos.html" %}

{% block subSectionClasses %}demo_form_auth{% endblock %}
{% block meta_title %}Demo - Form Authentication{% endblock %}
{% block meta_description %}Form Authentication demo using Spincast{% endblock %}

{% block subBody %}

Form Authentication demo

Demo

You can register using a temporary account usin a "[anything]@example.com" email. This will create an account which will be valid for 24 hours.

Once the account is created, you will be able to login, logout, use the "remember me" feature and save some preferences to test the session feature.

Login to our site

Enter username and password to log on:

Sign up now

Fill in the form below to get instant access:

How to

Protecting a resource or a set of resources with HTTP authentication is very easy. You simply use the httpAuth(...) method of the router. You specify the route to protect and a name to identify that "realm" (the protected section).

router.httpAuth("/route/to/protect", "protected example");

The resource is then protected!

But how do you specify which username/password combinations are allowed to access that realm? You use the addHttpAuthentication(...) method of the server instance. You specify the name of the realm and a username/password allowed to access it. Of course, you can add more that one credential for the same realm!

server.addHttpAuthentication("protected example", "Stromgol", "Laroche")

More info

Learn more about HTTP Authentication in the documentation.

{% endblock %}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy