<commit_before>Pyramid JWT example use cases
=============================

This is a basic guide (that will assume for all following statements that you
have followed the Readme for this project) that will explain how (and why) to
use JWT to secure/restrict access to a pyramid REST style backend API, this
guide will explain a basic overview on:

  - Creating JWT's
  - Decoding JWT's
  - Restricting access to certain pyramid views via JWT's


Creating JWT's
--------------

First off, lets start with the first view in our pyramid project, this would
normally be say a login view, this view has no permissions associated with it,
any user can access and post login credentials to it, for example:

.. code-block:: python

   def authenticate_user(login, password):<commit_msg>ReST syntax tweak.<commit_after>Pyramid JWT example use cases
=============================

This is a basic guide (that will assume for all following statements that you
have followed the Readme for this project) that will explain how (and why) to
use JWT to secure/restrict access to a pyramid REST style backend API, this
guide will explain a basic overview on:

- Creating JWT's
- Decoding JWT's
- Restricting access to certain pyramid views via JWT's


Creating JWT's
--------------

First off, lets start with the first view in our pyramid project, this would
normally be say a login view, this view has no permissions associated with it,
any user can access and post login credentials to it, for example:

.. code-block:: python

   def authenticate_user(login, password):
{'fraction_non_alphanumeric': 0.09685695958948044, 'fraction_numerical': 0.0, 'mean_word_length': 4.098039215686274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1305331', 'n_tokens_mistral': 424, 'n_tokens_neox': 383, 'n_words': 225}