Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authentication #594

Open
wants to merge 74 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
74d5c21
improve ISessionStore interface
glyph May 31, 2023
13d01e3
add AuthorizationMap protocol to make key/value correspondence clear
glyph May 31, 2023
0a32d3f
improve type annotations
glyph May 31, 2023
8d46098
add IRequirementContext interface
glyph May 31, 2023
ea3e86b
Implement the ability to hook response-calculation completion
glyph May 31, 2023
0311f4f
rewrap
glyph May 31, 2023
de2f3b9
reformat
glyph May 31, 2023
b4cabfe
ignore protocol stubs for coverage
glyph May 31, 2023
15d2cd5
export IRequirementContext interface
glyph May 31, 2023
3f64679
more complete memory store
glyph May 31, 2023
91d5e6f
add helpers for dealing with coroutines & threads
glyph May 31, 2023
bf7b980
refactor session procurer to have more functions that are less huge
glyph May 31, 2023
2d42995
stand-alone async database access package
glyph May 31, 2023
9ccc9c3
secure password storage, with citations from owasp
glyph May 31, 2023
956bfe7
Session and simple user store, backed by an SQL database
glyph May 31, 2023
a08b6cc
make `diff-cover` work locally by separating coverage_combine step
glyph May 31, 2023
9bd66e9
wip
glyph May 31, 2023
9c48cf2
if we need typing_extensions at all, we need it for everything
glyph May 31, 2023
93b5798
fix incremental dep
glyph May 31, 2023
0ceb56e
wip
glyph May 31, 2023
39727c9
blacken
glyph May 31, 2023
691b7b0
update for more recent incremental
glyph May 31, 2023
007768f
scrypt fallback
glyph May 31, 2023
66c9bec
type checking for scrypt fallback
glyph May 31, 2023
a0a6807
correct pypy3 coverage paths
glyph Jun 2, 2023
db8c339
simpler parsing, tests for errors, and a public API for passwords
glyph Jun 2, 2023
6112c35
in-memory testing engine so we don't run scrypt all the time
glyph Jun 2, 2023
1c8bae3
use public API and speed up tests a bunch
glyph Jun 2, 2023
c697f03
factor out password storage fixture
glyph Jun 2, 2023
ccfa0df
allow for testing of hash upgrading
glyph Jun 2, 2023
d913d87
move passwords to dedicated packages
glyph Jun 2, 2023
346599f
split up passwords module
glyph Jun 2, 2023
add2b52
add defaultSecureEngine top-level entrypoint
glyph Jun 2, 2023
73a2bb3
clean up callers
glyph Jun 2, 2023
079eeba
maybe 'access' isn't the best branding for a database thing
glyph Jun 2, 2023
0cd6423
Basic package-level docstrings.
glyph Jun 2, 2023
fc409ed
allow plated routes to return arbitrary HTTP responses
glyph Jun 3, 2023
bdcef9b
don't start exploding with tracebacks just because I restarted a memo…
glyph Jun 3, 2023
e361a39
Merge remote-tracking branch 'origin/trunk' into lots-more-docs
glyph Jun 3, 2023
6337810
enable pypy coverage
glyph Jun 3, 2023
2895d09
I guess the tox-prefix needs to be explicit in a custom matrix entry
glyph Jun 3, 2023
883917c
add Plating.fragment to make it easier to document complex lists
glyph Jun 3, 2023
a9d3b81
make applyBasicSchema public API
glyph Jun 3, 2023
598f2b7
looser type annotations; Interface isn't required anywhere here, so d…
glyph Jun 3, 2023
5b15e17
WIP: start the actual docs driving this whole process
glyph Jun 3, 2023
1cdc8c6
logout
glyph Jun 3, 2023
537fd8b
more example updates
glyph Jun 3, 2023
b9c9f5d
docs say that the value is displayed on the button but it isn't
glyph Jun 3, 2023
cd95186
'if not TYPE_CHECKING' causes coverage issues, so type:ignore is better
glyph Jun 3, 2023
65cf572
add cryptography for type-checking scrypt compatibility
glyph Jun 3, 2023
c1b7692
support coroutines directly in authorizers
glyph Jun 4, 2023
b61927d
remove debug prints
glyph Jun 4, 2023
a3d4eb6
hoist table for indentation aesthetics, remove debug prints
glyph Jun 4, 2023
48c0e12
words
glyph Jun 4, 2023
b86a712
anonymous form handling (sessions, no accounts)
glyph Jun 5, 2023
45838c2
copy of anon version
glyph Jun 5, 2023
9b47b15
type annotation so mypy doesn't think it's Any
glyph Jun 5, 2023
65bc387
test-case-name annotation
glyph Jun 5, 2023
1e030b8
remember session creation mechanism so we don't mix up API keys & coo…
glyph Jun 5, 2023
75bd50f
much more comprehensive example
glyph Jun 5, 2023
910e39d
really start documenting all this stuff
glyph Jun 6, 2023
324872d
comments for schema
glyph Jun 6, 2023
d953f16
make SessionStore public, since it pretty much needs to be
glyph Jun 6, 2023
63b98ed
more auth documentation
glyph Jun 6, 2023
b5a74ad
conditional navigation and attendant interface changes
glyph Jun 6, 2023
15eab46
remove debug prints
glyph Jun 6, 2023
4a882f2
coverage 1
glyph Jun 6, 2023
4dd5a99
coverage 2
glyph Jun 6, 2023
f67034e
Merge branch 'trunk' into lots-more-docs
glyph Jul 16, 2023
c52d84c
Merge remote-tracking branch 'origin/trunk' into lots-more-docs
glyph Aug 8, 2023
aaa80e8
Merge remote-tracking branch 'origin/trunk' into lots-more-docs
glyph Aug 15, 2023
cc87fda
Merge branch 'trunk' into lots-more-docs
glyph Sep 25, 2023
2939c22
Merge remote-tracking branch 'origin/trunk' into lots-more-docs
glyph Dec 20, 2023
c243f63
Merge branch 'trunk' into lots-more-docs
glyph Jan 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ omit = src/klein/test/typing_*.py
source=
src/klein
.tox/*/lib/python*/site-packages/klein
.tox/*/lib/pypy*/site-packages/klein
.tox/*/Lib/site-packages/klein
.tox/pypy*/site-packages/klein

[report]
exclude_lines =
pragma: no cover
if TYPE_CHECKING:
\s*\.\.\.$
16 changes: 14 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.7", "3.9", "3.10", "3.11"]
twisted-version: ["21.2", "22.1", "23.8"]
twisted-version: ["21.2", "22.1", "23.8", "23.10"]
tox-prefix: ["coverage"]
optional: [false]
include:
Expand Down Expand Up @@ -225,7 +225,9 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: |
${{ matrix.python-version }}
3.11

- name: System Python Information
uses: twisted/python-info-action@v1
Expand Down Expand Up @@ -264,6 +266,16 @@ jobs:
- name: Run unit tests
run: tox run -e ${TOX_ENV}

- name: Combine coverage
run: tox run -e coverage_combine,coverage_report
if: ${{ matrix.tox-prefix == 'coverage' }}

- name: Upload Coverage XML
uses: actions/upload-artifact@v3
with:
name: coverage-debug
path: coverage.xml

- name: Upload Trial log artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ recursive-include docs *.rst
recursive-include docs *.txt
recursive-exclude docs/_build *
recursive-exclude requirements *
recursive-include src *.sql
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ This is an introduction to Klein, going through from creating a simple web site

introduction/1-gettingstarted
introduction/2-twistdtap
introduction/3-forms
introduction/4-auth


Klein Examples
Expand Down
2 changes: 2 additions & 0 deletions docs/introduction/1-gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ If you run this example and then visit ``http://localhost:8080/``, you will get
Streamlined Apps With HTML and JSON
===================================

.. _htmljson:

For a typical web application, the first order of business is generating some
simple HTML pages that users can interact with and that search engines can
easily index.
Expand Down