Added Persona example
This commit is contained in:
parent
e17024e85a
commit
5f648a8eb8
6 changed files with 198 additions and 0 deletions
23
examples/persona/templates/index.html
Normal file
23
examples/persona/templates/index.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{% extends "layout.html" %}
|
||||
{% block title %}Welcome{% endblock %}
|
||||
{% block body %}
|
||||
<h2>Welcome</h2>
|
||||
<p>
|
||||
This is a small example application that shows how to integrate
|
||||
Mozilla's persona signin service into a Flask application.
|
||||
<p>
|
||||
The advantage of persona over your own login system is that the
|
||||
password is managed outside of your application and you get
|
||||
a verified mail address as primary identifier for your user.
|
||||
<p>
|
||||
In this example nothing is actually stored on the server, it
|
||||
just takes over the email address from the persona verifier
|
||||
and stores it in a session.
|
||||
{% if g.user %}
|
||||
<p>
|
||||
You are now logged in as <strong>{{ g.user }}</strong>
|
||||
{% else %}
|
||||
<p>
|
||||
To sign in click the sign in button above.
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue