Skip to content

Commit

Permalink
- add the to_header function to the Auth class;
Browse files Browse the repository at this point in the history
  • Loading branch information
ly-mariia authored and felliott committed Apr 17, 2024
1 parent 30a3623 commit 736ad49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions framework/auth/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def __repr__(self):
return ('<Auth(user="{self.user}", '
'private_key={self.private_key})>').format(self=self)

def to_header(self):
return f"Basic {self.user.username}"

@property
def logged_in(self):
return self.user is not None
Expand Down

0 comments on commit 736ad49

Please sign in to comment.