Skip to content

Commit 4b1e33c

Browse files
Restore the name guardpost 🔤
See Neoteroi/BlackSheep#299
1 parent d9bc570 commit 4b1e33c

36 files changed

Lines changed: 67 additions & 70 deletions

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- "*"
1313

1414
env:
15-
PROJECT_NAME: neoteroi
15+
PROJECT_NAME: guardpost
1616

1717
jobs:
1818
build:

CHANGELOG.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.0.0] - 2022-12-xx :star:
9-
- Renames the library to `neoteroi-auth`.
10-
- Adopts PEP 420 and renames the main namespace from `guardpost` to `neoteroi.auth`
8+
## [1.0.0] - 2023-01-07 :star:
119
- Adds built-in support for dependency injection, using the new `ContainerProtocol`
12-
in `neoteroi-di` (new version of `rodi`).
10+
in `rodi` v2.
1311
- Removes the synchronous code API, maintaining only the asynchronous code API
14-
for `AuthenticationStrategy.authenticate` and `AuthorizationStrategy.authorize`.
12+
for `AuthenticationStrategy.authenticate` and `AuthoreoizationStrategy.authorize`.
1513
- Replaces `setup.py` with `pyproject.toml`.
1614
- Reduces imports verbosity.
1715
- Improves the `identity_getter` code API.

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
lint-types:
5-
mypy neoteroi --explicit-package-bases
5+
mypy guardpost --explicit-package-bases
66

77

88
artifacts: test
@@ -34,30 +34,30 @@ test:
3434

3535

3636
test-cov:
37-
python -m pytest --cov-report html --cov=neoteroi tests/
37+
python -m pytest --cov-report html --cov=guardpost tests/
3838

3939

4040
lint: check-flake8 check-isort check-black
4141

4242
format:
43-
@isort neoteroi 2>&1
43+
@isort guardpost 2>&1
4444
@isort tests 2>&1
45-
@black neoteroi 2>&1
45+
@black guardpost 2>&1
4646
@black tests 2>&1
4747

4848
check-flake8:
4949
@echo "$(BOLD)Checking flake8$(RESET)"
50-
@flake8 neoteroi 2>&1
50+
@flake8 guardpost 2>&1
5151
@flake8 tests 2>&1
5252

5353

5454
check-isort:
5555
@echo "$(BOLD)Checking isort$(RESET)"
56-
@isort --check-only neoteroi 2>&1
56+
@isort --check-only guardpost 2>&1
5757
@isort --check-only tests 2>&1
5858

5959

6060
check-black: ## Run the black tool in check mode only (won't modify files)
6161
@echo "$(BOLD)Checking black$(RESET)"
62-
@black --check neoteroi 2>&1
62+
@black --check guardpost 2>&1
6363
@black --check tests 2>&1

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Build](https://github.com/Neoteroi/guardpost/workflows/Build/badge.svg)](https://github.com/Neoteroi/guardpost/actions?query=workflow%3ABuild)
2-
[![pypi](https://img.shields.io/pypi/v/neoteroi-auth.svg?color=blue)](https://pypi.org/project/neoteroi-auth/)
3-
[![versions](https://img.shields.io/pypi/pyversions/neoteroi-auth.svg)](https://github.com/Neoteroi/guardpost)
2+
[![pypi](https://img.shields.io/pypi/v/guardpost.svg?color=blue)](https://pypi.org/project/guardpost/)
3+
[![versions](https://img.shields.io/pypi/pyversions/guardpost.svg)](https://github.com/Neoteroi/guardpost)
44
[![license](https://img.shields.io/github/license/Neoteroi/guardpost.svg)](https://github.com/Neoteroi/guardpost/blob/main/LICENSE)
55
[![codecov](https://codecov.io/gh/Neoteroi/guardpost/branch/main/graph/badge.svg?token=sBKZG2D1bZ)](https://codecov.io/gh/Neoteroi/guardpost)
66

@@ -23,13 +23,13 @@ although its implementation is extremely different.
2323
## Installation
2424

2525
```bash
26-
pip install neoteroi-auth
26+
pip install guardpost
2727
```
2828

2929
To install with support for `JSON Web Tokens (JWTs)` validation:
3030

3131
```
32-
pip install neoteroi-auth[jwt]
32+
pip install guardpost[jwt]
3333
```
3434

3535
### Examples
@@ -48,13 +48,12 @@ Usually, to implement authorization, is necessary to have the context of the
4848
entity that is executing the action.
4949

5050
## Usage in BlackSheep
51-
`neoteroi-auth` is used in the second version of the
52-
[BlackSheep](https://www.neoteroi.dev/blacksheep/) web framework, to implement
53-
[authentication and authorization
51+
`guardpost` is used in the [BlackSheep](https://www.neoteroi.dev/blacksheep/)
52+
web framework, to implement [authentication and authorization
5453
strategies](https://www.neoteroi.dev/blacksheep/authentication/) for request
5554
handlers.
5655

57-
To see how `neoteroi-auth` is used in `blacksheep` web framework, read:
56+
To see how `guardpost` is used in `blacksheep` web framework, read:
5857

5958
* [Authentication](https://www.neoteroi.dev/blacksheep/authentication/)
6059
* [Authorization](https://www.neoteroi.dev/blacksheep/authorization/)

examples/example-01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
import asyncio
66

7-
from neoteroi.auth import AuthenticationHandler, AuthenticationStrategy, Identity
7+
from guardpost import AuthenticationHandler, AuthenticationStrategy, Identity
88

99

1010
class MyAppContext:

examples/example-02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
import asyncio
66

7-
from neoteroi.auth import AuthenticationHandler, AuthenticationStrategy, Identity
7+
from guardpost import AuthenticationHandler, AuthenticationStrategy, Identity
88

99

1010
class MyAppContext:

examples/example-03.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
import asyncio
66

7-
from neoteroi.auth import AuthenticationHandler, AuthenticationStrategy, Identity
7+
from guardpost import AuthenticationHandler, AuthenticationStrategy, Identity
88

99

1010
class MyAppContext:

examples/example-04.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"""
55
import asyncio
66

7-
from neoteroi.di import Container
7+
from rodi import Container
88

9-
from neoteroi.auth import AuthenticationHandler, AuthenticationStrategy, Identity
9+
from guardpost import AuthenticationHandler, AuthenticationStrategy, Identity
1010

1111

1212
class MyAppContext:

examples/example-05.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import asyncio
77

8-
from neoteroi.auth import (
8+
from guardpost import (
99
AuthorizationContext,
1010
AuthorizationError,
1111
AuthorizationStrategy,

examples/example-06.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
import asyncio
99

10-
from neoteroi.auth import (
10+
from guardpost import (
1111
AuthorizationContext,
1212
AuthorizationError,
1313
AuthorizationStrategy,
1414
Identity,
1515
Policy,
1616
Requirement,
1717
)
18-
from neoteroi.auth.common import AuthenticatedRequirement
18+
from guardpost.common import AuthenticatedRequirement
1919

2020

2121
class MyAppContext:

0 commit comments

Comments
 (0)