Metadata-Version: 2.4
Name: magma-auth
Version: 1.0.1
Summary: MAGMA Indonesia Authentication
Keywords: magma,indonesia
Author-email: Martanto <martanto@live.com>, Devy Kamil Syahbana <devy.syahbana@gmail.com>, Syarif Abdul Manaf <riefmof@gmail.com>
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
License-File: LICENSE
Requires-Dist: cryptography
Requires-Dist: pyjwt
Requires-Dist: cryptography ; extra == "dev"
Requires-Dist: pyjwt ; extra == "dev"
Requires-Dist: black[d] ; extra == "dev"
Requires-Dist: isort ; extra == "dev"
Project-URL: Homepage, https://github.com/martanto/magma-auth
Project-URL: Issues, https://github.com/martanto/magma-auth/issues
Provides-Extra: dev

# magma-auth
Python package for MAGMA Authentication

## Install module
Check here: https://pypi.org/project/magma-auth/

```python
pip install magma-auth
```

## Import module
```python
from magma_auth import auth
```

### Login using username and password
This will save (encrypted) your username and password.

```python
auth.login(
    username="<USERNAME>",
    password="<PASSWORD"
)
```
Renew or re-login
```python
auth.renew()
```
### Save your token
```python
auth.save_token("<TOKEN>")
```

### Get your token
```python
auth.token
```

### Get token expired time
```python
auth.expired_at
```

### Validate and check your token
This will check and validate token from MAGMA server.
```python
from magma_auth import validate_token

validate_token(token)
```
