Skip to content

Commit

Permalink
Docs and error revision
Browse files Browse the repository at this point in the history
  • Loading branch information
na-stewart committed Jun 23, 2024
1 parent 2bb58a8 commit 52416f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ New/Refreshed session automatically returned if expired during authentication, r
@app.post("api/security/auth")
@requires_authentication
async def on_authenticate(request):
authentication_session = request.ctx.authentication_session.json
authentication_session = request.ctx.authentication_session
response = json(
"You have been authenticated.",
authentication_session.json,
Expand Down
2 changes: 1 addition & 1 deletion sanic_security/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class DeactivatedError(SessionError):
Raised when session is deactivated.
"""

def __init__(self, message: str = "Session is deactivated.", code: int = 401):
def __init__(self, message: str = "Session has been deactivated or refreshed.", code: int = 401):
super().__init__(message, code)


Expand Down
2 changes: 1 addition & 1 deletion sanic_security/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ class AuthenticationSession(Session):
Attributes:
requires_second_factor (bool): Determines if session requires a second factor.
refresh_expiration_date (bool): Date and time the session can no longer be refreshed.
is_refresh (bool): Will only be true when instantiated during refresh of expired session.
is_refresh (bool): Will only be true once when instantiated during refresh of expired session.
"""

requires_second_factor: bool = fields.BooleanField(default=False)
Expand Down

0 comments on commit 52416f3

Please sign in to comment.