Usage Examples¶
Flask-PASETO-Extended provides three classes for each purpose.
PasetoLoginManager¶
By using this class together with Flask-Login, you can use PASETO for remember-me tokens which is also encoded into a Cookie value.
PasetoLoginManager can be used as follows:
import flask
import flask_login
# Import PasetoLoginManager instead of flask_login.LoginManager.
from flask_paseto_extended import PasetoLoginManager
app = flask.Flask(__name__)
app.secret_key = "super secret string"
login_manager = PasetoLoginManager(app)
See examples/login_manager.py for a sample code that actually works.
PasetoManager¶
This class can be used for verifying public (signed) PASETO. It is suitable for using PASETO as API tokens.
T.B.D.