-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
273 additions
and
589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Vonage Network API Authentication Client | ||
|
||
This package (`vonage-network-auth`) provides a client for authenticating Network APIs that require Oauth2 authentcation. Using it, it is possible to generate authenticated JWTs for use with GNP APIs, e.g. Sim Swap, Number Verification. | ||
|
||
This package is intended to be used as part of an SDK, accessing required methods through the SDK instead of directly. Thus, it doesn't require manual installation or configuration unless you're using this package independently of an SDK. | ||
|
||
For full API documentation, refer to the [Vonage developer documentation](https://developer.vonage.com). | ||
|
||
## Installation | ||
|
||
Install from the Python Package Index with pip: | ||
|
||
```bash | ||
pip install vonage-network-auth | ||
``` | ||
|
||
## Usage | ||
|
||
### Create a `NetworkAuth` Object | ||
|
||
```python | ||
from vonage_network_auth import NetworkAuth | ||
from vonage_http_client import HttpClient, Auth | ||
|
||
network_auth = NetworkAuth(HttpClient(Auth(application_id='application-id', private_key='private-key'))) | ||
``` | ||
|
||
### Generate an Authenticated Access Token | ||
|
||
```python | ||
token = camara_auth.get_oauth2_user_token( | ||
number='447700900000', scope='dpv:FraudPreventionAndDetection#check-sim-swap' | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .network_auth import NetworkAuth | ||
from .responses import OidcResponse, TokenResponse | ||
|
||
__all__ = ['NetworkAuth', 'OidcResponse', 'TokenResponse'] |
Oops, something went wrong.