Client library for Purple Auth
Project description
Purple Auth Client
An async python client for my "Purple Auth" microservice.
Routes Covered
initialization
from purple_auth_client import AuthClient
auth_client = AuthClient(
host="https://purpleauth.com",
app_id="37f9a26d-03c8-4b7c-86ad-132bb82e8e38"
)
/otp/request/
Start otp authentication flow with server.
result = await auth_client.authenticate(
"test@example.com", flow="otp"
)
/otp/confirm/
Complete authentication with email and generated code.
result = await auth_client.submit_code("test@example.com", "12345678")
/token/verify/
Send idToken to server for verification.
result = await auth_client.verify_token_remote(token_submitted_by_client)
/token/refresh/
Request a new ID Token from the server using a refresh token
new_token = await auth_client.refresh(refresh_token_from_client)
/app/
Get more info about this app from the server.
info = await auth_client.app_info()
/magic/request/
Start authentication using magic link flow.
result = await auth_client.authenticate(
"test@example.com", flow="magic"
)
Local Verification
Verify and decode an ID Token on directly in the app without having to call out every time
result = await auth_client.verify(id_token_from_client)
# {"headers": {"alg": "ES256", "type": "JWT"}, "claims": {"sub": "user@email.com", "exp": "test@example.com"}
# etc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for purple-auth-client-0.1.3.post2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13b54e9814bf20c1d836600acc46b60dbfcba2387638a0e3f4a5a7f9973c658b |
|
MD5 | 283d5e1ee3e78504da37446764631303 |
|
BLAKE2b-256 | 6bf536a2e7cf86d8a46df55e555b643087f51db2912be45f5aa84526879dfd91 |
Close
Hashes for purple_auth_client-0.1.3.post2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f1278c7a344e15bdb135232f7cad23c70e2387bbb79000d096332653ce4d302 |
|
MD5 | f2e7bf4e8ec0e7650f7796ba0d4ac4e6 |
|
BLAKE2b-256 | 17ab662ee1cfd404a57fea071c6d6451ac73754d30da64ddc23ed461783a621e |