Skip to content

Commit

Permalink
docs(auth): add some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Dec 16, 2023
1 parent f9c1c8a commit 017bfae
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/nbiatoolkit/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ class OAuth2:
to the collections tagged with "limited access" you can use those
credentials to access those collections.
NOTE::This class is mainly for developers looking to add functionality
Notes
-----
This class is mainly for developers looking to add functionality
to the nbiatoolkit package. If you are a user looking to access the NBIA
API, you can use the `NBIAClient` class without knowledge of this class.
TODO::implement better access token handling
TODO::implement better error handling
TODO::implement refresh token functionality
TODO::implement logout functionality
TODO::implement encryption for username and password
Attributes
----------
client_id : str
Expand All @@ -43,12 +39,15 @@ class OAuth2:
Example Usage
-------------
>>> from nbiatoolkit import OAuth2
>>> from nbiatoolkit.auth import OAuth2
To use the NBIA Guest account:
>>> oauth = OAuth2()
To use a custom account:
>>> oauth = OAuth2(username="my_username", password="my_password")
>>> oauth = OAuth2(username="my_username", password="my_password")
"""

def __init__(self, username: str = "nbia_guest", password: str = "", client_id: str = "NBIA"):
Expand Down

0 comments on commit 017bfae

Please sign in to comment.