Skip to content

Commit f16972c

Browse files
authored
Merge branch 'master' into dependabot/pip/mypy-1.8.0
2 parents d830942 + 6b9fa40 commit f16972c

File tree

5 files changed

+23
-20
lines changed

5 files changed

+23
-20
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313
- name: Set up Python
14-
uses: actions/setup-python@v4
14+
uses: actions/setup-python@v5
1515
with:
1616
python-version: 3.8
1717
- name: Install Flit
1818
run: pip install flit
1919
- name: Install Dependencies
2020
run: flit install --symlink
21+
- name: Install build dependencies
22+
run: pip install build
23+
- name: Build distribution
24+
run: python -m build
2125
- name: Publish
22-
env:
23-
FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }}
24-
FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}
25-
run: flit publish
26+
uses: pypa/[email protected]
27+
with:
28+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
- name: Set up Python
15-
uses: actions/setup-python@v4
15+
uses: actions/setup-python@v5
1616
with:
1717
python-version: 3.8
1818
- name: Install Flit
@@ -22,4 +22,4 @@ jobs:
2222
- name: Test
2323
run: make test-cov
2424
- name: Coverage
25-
uses: codecov/codecov-action@v3.1.4
25+
uses: codecov/codecov-action@v4.1.0

.github/workflows/test_full.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717
- name: Set up Python
18-
uses: actions/setup-python@v4
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install Flit
@@ -30,7 +30,7 @@ jobs:
3030
steps:
3131
- uses: actions/checkout@v4
3232
- name: Set up Python
33-
uses: actions/setup-python@v4
33+
uses: actions/setup-python@v5
3434
with:
3535
python-version: 3.8
3636
- name: Install Flit

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ There are two ways in config JWTModule
7777
```
7878
- **register**:
7979

80-
`JWTModule.register` allow you to provide JWT configuration in Ellar application config object using `JWT_CONFIG` key.
80+
`JWTModule.register` lets you provide JWT configuration in the Ellar application config object using the `JWT_CONFIG` key.
8181
The register function will create a `ModuleSetup` object that will inject application `config` to a JWT config factory
8282

8383
for example:
@@ -101,7 +101,7 @@ There are two ways in config JWTModule
101101
'jti': "jti",
102102
'lifetime': timedelta(minutes=5), # token lifetime, this will example in 5 mins
103103

104-
'json_encoder':json.JSONEncoder # token lifetime, this will example
104+
'json_encoder':json.JSONEncoder # token lifetime, this will be an example
105105
}
106106
```
107107
In `auth/module.py`
@@ -138,7 +138,7 @@ JWT_CONFIG = {
138138
'jti': "jti",
139139
'lifetime': timedelta(minutes=5), # token lifetime, this will example in 5 mins
140140

141-
'json_encoder':json.JSONEncoder # token lifetime, this will example
141+
'json_encoder':json.JSONEncoder # token lifetime, this will be an example
142142
}
143143
```
144144

@@ -156,9 +156,9 @@ In this scenario, selecting an RSA algorithm mandates configuring the `signing_s
156156
- ### `signing_secret_key`
157157
The signing key utilized for signing the content of generated tokens has distinct requirements based on the signing protocol.
158158
For HMAC signing, it should be a randomly generated string containing at least as many bits as dictated by the signing protocol.
159-
Conversely, for RSA signing, it should be a string encompassing an RSA private key with a length of 2048 bits or more.
160-
As Simple JWT defaults to 256-bit HMAC signing, the `signing_secret_key` setting automatically takes on the value of your django project's `SECRET_KEY`.
161-
While this default is practical, it's advisable for developers to modify this setting to a value separate from the django project's secret key.
159+
Conversely, an RSA signing should be a string encompassing an RSA private key with a length of 2048 bits or more.
160+
As Simple JWT defaults to 256-bit HMAC signing, the `signing_secret_key` setting automatically takes on the value of your Django project's `SECRET_KEY`.
161+
While this default is practical, developers should modify this setting to a value separate from the Django project's secret key.
162162
This adjustment facilitates easier token signing key changes if the key is ever compromised.
163163

164164
- ### `verifying_secret_key`
@@ -184,7 +184,7 @@ Leeway provides a buffer for the expiration time, which can be defined as an int
184184
For further details, please consult the following link: https://pyjwt.readthedocs.io/en/latest/usage.html#expiration-time-claim-exp
185185

186186
- ### `jti`
187-
The claim designated for storing a token's unique identifier, which is utilized to distinguish revoked tokens within the blacklist application.
187+
The claim is designated for storing a token's unique identifier, which is utilized to distinguish revoked tokens within the blacklist application.
188188
There might be instances where an alternative claim other than the default "jti" claim needs to be employed for storing this value
189189

190190
- ### `json_encoder`
@@ -197,13 +197,13 @@ JSON Encoder class that will be used by the `PYJWT` to encode the `jwt_payload`.
197197
The `JwtService` uses [PYJWT](https://pypi.org/project/PyJWT/) underneath.
198198

199199
### _jwt_service.sign(payload: dict, headers: Dict[str, t.Any] = None, **jwt_config: t.Any) -> str_
200-
Creates a jwt token for the provided payload. Also, you can override default jwt config by using passing some keyword argument as a `jwt_config`
200+
Creates a jwt token for the provided payload. Also, you can override the default jwt config by using passing some keyword argument as a `jwt_config`
201201

202202
### _jwt_service.sign_async(payload: dict, headers: Dict[str, t.Any] = None, **jwt_config: t.Any) -> str_
203203
Async action for `jwt_service.sign`
204204

205205
### _jwt_service.decode(token: str, verify: bool = True, **jwt_config: t.Any) -> t.Dict[str, t.Any]:_
206-
Verifies and decodes provided token. And raises JWTException exception if token is invalid or expired
206+
Verifies and decodes provided token. And raises a JWTException exception if the token is invalid or expired
207207

208208
### _jwt_service.decode_async(token: str, verify: bool = True, **jwt_config: t.Any) -> t.Dict[str, t.Any]:_
209209
Async action for `jwt_service.decode`

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ Homepage = "https://python-ellar.github.io/ellar-jwt/"
6060

6161
[project.optional-dependencies]
6262
test = [
63-
"pytest >= 7.1.3,<8.0.0",
63+
"pytest >= 7.1.3,< 9.0.0",
6464
"pytest-cov >= 2.12.0,<5.0.0",
65-
"ruff ==0.1.7",
6665
"mypy == 1.8.0",
66+
"ruff ==0.3.0",
6767
"pytest-asyncio",
6868
"autoflake",
6969
"types-python-dateutil",

0 commit comments

Comments
 (0)